moved blog to different domain and now I get a login popup

Topics: ASP.NET 2.0
Jul 11, 2011 at 10:58 PM


A customer of me, has asked me to move the blog to a different location.
So I have moved it to a different hosting company.
I have copied all files in a directory, and created a virtual directory.

If I go to that blog, at first I get a popup, in order to login.

I click cancel.
Then I get an error.
If I press F5 now, I see the blog

I have no idea what could have gone wrong.

This is the error


Server Error in '/blogai' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<customErrors mode="Off"/>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>

Jul 12, 2011 at 12:02 AM

Do you have windows authentication enabled on this site? If you are getting a login box come up sounds like you have incorrect settings in IIS.

The BlogEngine.Net platform uses forms authentication and therefore you should disable windows authentication.

Also, it would be very helpful to chnage you customErrors mode to Off and set compliation debug="true". This will greatly help you understand exactly why this is happening.

Jul 12, 2011 at 9:01 AM
Edited Jul 12, 2011 at 9:13 AM

I will ask the hosting company to change settings to formsauthentication.
I have changed the customerrors and the debug.
I do not get the login pop up now, but it takes ages to get the error below. reload, I see the blog.

Now I get this error:




Server Error in '/blogai' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The value of the property 'mode' cannot be parsed. The error is: The enumeration value must be one of the following: RemoteOnly, On, Off.

Source Error:


Line 63: 		</pages>
Line 64: 		
Line 65:     <customErrors mode="off">
Line 66: 			<error statusCode="404" redirect="~/error404.aspx"/>
Line 67: 		</customErrors>

Source File: D:\...\...\blogai\web.config    Line: 65 


Jul 12, 2011 at 3:01 PM

As an addition, I have received this information from my hosting company:

I can confirm this is not related to authentication methods but a design behaviour within .NET framework, we run .NET under the Microsoft recommended security policy of Medium Trust using identity impersonation however identity impersonation does not happen until after the application has started meaning code in the Application_Start event does not run under the correct user and therefore does not have access to the domains webspace etc... this is what causes the login box on the first page load but not subsequent page loads because Application_Start has already fired. This problem became well known in DotNetNuke and there is lots of information about it on their forum and on Microsoft forum/connect websites. To resolve the problem, code which accesses the domains webspace cannot exist in the Application_Start event and should be moved.


What now?




Rob Bindels