today I have deployed my first MVC 2 application on Windows Server 2008, and something strange happen.
Authentication was requested on almost every pages, even to access 'scripts' and 'contents' folders.
This was strange because this behavior doesn't occur on my development environment.
Then I have setup IIS in my Win7, to test it on IIS environment, and every works as expected.
So my question is, does anyone have any idea what could be happening on Windows Server 2008 deployment?
Thanks
After testing many situations I have found out that, this problem was due to permissions on Application Pool, and not related to MVC
Related
I have an old web application which formerly ran on a windows 2003 server. When I moved it to a new Windows 2008 server, I started receiving an error that I never had before. The app uses a windows login. Upon accessing the app, the user is asked for their login. After that, they are free to use to application. However, the issue is that after using it for some time, the user will be booted out and asked to login again. The system is also much slower than it was previously. It is operating on IIS7. It seems to me that there is a loss of session variables occurring, but I am unsure about why that would be the case.
Interestingly, when the user logs in again, they can generally use the application for a longer period of time before being booted out and asked to log in again. It is also worth mentioning that it seems like the more users there are on the server, the less prominent the issue is.
It is also worth mentioning that I tried moving the application to another 2008 server, and it worked perfectly fine on that one. This leads me to believe that the issue lies somewhere in the settings on the server. I looked at the settings of the two 2008 servers side-by-side and noted the differences, but was incapable of finding a difference that would cause this sort of error. One difference that might be worth noting is that the server which does not work properly is 32 bit, whereas the server which does works is 64 bit. Although, I don't see how that difference could lead to the application having a loss of session variables, but still working otherwise.
Additional information:
The code in the application on each server is identical, so that leads me to believe that the error is on the server level and not within the application itself.
Given that the code is identical, I do not believe this to be a result of Session.Abandon() being called from anywhere.
I do not believe this is due to a session timeout.
I have read that other people experience a loss of session variables due to app pool recycling, and that often the app pool recycling is from the config files being accessed (whether it be from a user or from something like an anti-virus software). I have no reason to believe that this is the case here, because all servers are under the same anti-virus and the application works fine on them.
On the server which works, the IIS authentication setting are set such that windows authentication is disabled and that anonymous authentication is enabled. Whereas, on the other server, the opposite is true.
Any help with this issue would be appreciated.
Thank you.
Make sure your app pool is running under 4.0 .Net Framework and also check your application pool identity. When your using 7.0 iis, make sure you use integrated mode.
I developed an Asp.Net application and published it on IIS on a Windows 7 Professional.
Suddenly, people who view my web application from internet, started encountering with a problem which seem to prevent cookies or sessions being created. Basicly, cookies and sessions can not work or can not be created or destroyed immediately.
My application has been on classic application pool on iis.
What do you recommend me about this strange problem?
I have solved my problem on my own. The problem is very silly indeed. My web server was configured to use port 8080. So i had to write the address as localhost:8080 on my browser.
I did some searches and i realised that : is a special character which causes the problem. I read some people who uses special characters (like _ etc.) in their address path faces the same issue on IIS on Windows 7 Professional
I just finished an MVC3 project using windows authenication. Everything was working fine on my local machine however once I deployed to IIS7 it wouldn't pick up any user. But after restarting IIS everything seems to work now. Does anybody know why that is? Or am I doing something wrong?
Thanks for your help!
Sometimes you just have to restart. You probably could have gotten away with just recycling the worker process.
As for the reason, probably because you created the iis application instance without an existing web.config in there, then when you deployed your site, IIS wasn't configured to watch for changes (because the file previously didn't exist), so it didn't know about the update.
First off, I'm very new to Azure.
I've successfully deployed an ASP.NET MVC 3 web application to Azure, using a web role. The app uses Entity Framework and SQL Azure.
Recently I've done some changes (some including adding appsettings), and tried to upgrade the application. When upgrading, it took quite a long time, before Aborting. I've always deployed through the management portal Silverlight application at http://windows.azure.com.
When trying again to no avail, I setup remote desktop and deployed again. The remote desktop session was extremely slow, and it turned out to be because WaIISHost was putting the CPU to 100%.
The IIS Manager shows that the application is deployed and 'started', however I cannot navigate to the site in the VM, and the deployment constantly seems to be trying to update without success and eventually aborting and retrying, (as I write this, it's currently Busy and Waiting for role to start...).
Does anyone have any ideas as to what the problem could be?
I believe all the right dependencies are set to copy local, which is a possible problem. It is extremely hard to debug this issue, as the remote desktop session hangs so often due to the 100% CPU utilization, and the recycling/restarting/reupdating of the web role from time to time.
Thanks,
James
P.S. Hope some of that made at least some sense...
I doubt that there's something doing in your WebRole.OnStart and/or Run, which caused the WaIISHost uses 100% CPU. Can you remove all codes from the WebRole.OnStart and/or Run and try again.
And it might be helpful to turn on the IntelliTrace when deploying, so that you can download the trace and find out any exceptions occurred when your application started, even before the website started.
I have a asp.net 3.5 web application which is deployed on server 2003 and IIS 6. After running fine for a few weeks it goes "Down" and by down I mean that when I try and access it the browser looks like it's loading but never actually serves the page. After an IIS reset it loads quickly again.
My question is what are the steps and tools I should use in tracking the root cause?
First point of interest would be the event viewer, second the iis logs. If you still do not find the error then performance counters could help you out there.