ASP.Net Membership, URL-Rewriting, IIS 7 on hosting server … Not working.

.net , asp.net Israel
  • 12 years ago

    Hello,

     

    I'm facing a strange problem in my website, and it's driving me completely crazy since I've been working on it for at least two weeks now, I would really appreciate any help or suggestions or tips, especially by Microsoft team because it seems to be an internal error (internal bug within the core code of  the framework).

     

    I have built an URL-rewriting mechanism and invoked it in a website that I have had developed recently, taking into consideration the website has asp.net membership implemented as well.

    The website is working fine on my local virtual server or on my IIS6.0, but when I upload the website online (GoDaddy hosting with IIS 7, .net framework 2.0) an error occurs each time I use any of the membership's functionalities in any of the redirected pages (i.e. the pages with the rewritten URL), while it works perfectly in normal pages.

     

    I tried to strip down my pages to the minimum, but still no matter how small the function that I'm using, I still get the null reference errors.

    For instance the following line:

    Object obj = Membership.GetUser();

    Which should run flawlessly to return either null or the currently logged in user (MembershipUser), is giving me a null reference exception.

     

    Base Error Message: Object reference not set to an instance of an object.
    Base Error Stacktrace: at System.Web.Security.Membership.GetCurrentUserName() at System.Web.Security.Membership.GetUser() at Display.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Base Error Source: System.Web

     

    I tried changing the hosting to IIS6, but still it's not working.

    I also tried to changing the URL rewriting mechanism and use http://www.urlrewriting.net/, still no use.

     

    Kindly feel free to leave any comment about the issue.

    Thank you in advance.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“It works on my machine.” - Anonymous