I have made some changes inside the user control, to both the code behind and aspx. When i run my local development or the dev site (posted the changes to dev site). I don't see my changes. I recycled the app pools and restarted the dev site as well.
I have placed break points in the code. The code never hits those. When i mouse over the break points after the page has executed, i get unreachable code message (yellow popop and attached).
I am only able to see my changes (local dev and dev site) after deleting asp.net temp internet files on my local machine and dev box.
I have just posted the code to the staging site and it is doing the same thing. Here i can't delete the asp.net temp files during the middle of the day or restart iis.
The project is
VS 2012
ASP.NET 4.5
IIS 7
Kentico CMS - Classic Asp.Net
This is the first time i am seeing this behavior. Has some one else seen this and how did you fix it?
Thanks.
I think, recycling the AppPool should solve the issue, and if the IIS is configured for Overlapping recycling, the users should notice that it is happening. Info from IIS MS Docu
...
Overlapping recycling, the default, lets an unhealthy worker process
become marked for recycling, but continues handling requests that this
unhealthy process has already received. It does not accept new
requests from HTTP.sys. When all existing requests are handled, the
unhealthy worker process shuts down.
...
I hope this helps.
Kentico had a caching bug that got fixed in HotFix upgrade 7.0.86. I have applied most recent HotFix 7.0.92 and on dev and staging sites, it looks fixed now.
Related
I'm working on a .net Core MVVC project devloped in VS Community 2017 and using IIS Express 10 and I'm having issues with TempData not working on two of the 3 computers I develop on. At one point it did work on all three.
I use TempData to store info during redirects and then transfer TempData to ViewData to display on the View page. I had issues with something (I don't remember what it was now) and was getting help from a co-worker and during his troubleshooting a box popped up and said something about SSL and I don't remember what he clicked but since then TempData stopped working. The one thing I think he did do differently than me was along the top in the Debug area, he clicked the IIS Express dropdown and chose the project name option instead. TempData now shows up as null after the redirect. When I open up the project on my home computer, TempData works with no issues. I have a 3rd computer I do some development on and it used to work on that until the SSL box popped up on that as well and it stopped working. I'm guessing that it's redirecting to the page I want but it's making a pit-stop somewhere along the way and the data is lost.
I tried uninstalling and reinstalling both VS and IIS Express with no change. I also tried deleting the .vs folder in the solution with no change. I tried clearing out the websites using the IIS Express command in the command prompt. I also tried it in both Chrome (where it used to work) and Internet Explorer with no change. I've tried running it with debugging and without debugging with no change.
So, TempData no longer works on two computers (both Windows 10 if it matters) and my home computer (Windows 7) works just fine. Anyone have any ideas?
by close look to your question, at first
"a co-worker and during his troubleshooting a box popped up and said
something about SSL and I don't remember what he clicked"
mybe your co-worker enabled ssl on development environment and after run the project you have to trust local IIS certificate.
I think you have to config cookie for using SSL for example <httpCookies requireSSL="true" /> or you can disable SSL for development and every thing gonna be OK.
for sure you can check that in home computer your URL have HTTP and in other two computers the URL starts with HTTPS.
On the other hands I suggest you to compare the web.config structures.
I found the answer finally at https://github.com/aspnet/Mvc/issues/8233
To fix the issue, I modified my Startup.cs file so that app.UseCookiePolicy(); was placed after app.UseMvc();. I don't know why it only affects one of my computers but it fixes the issue.
So, I've been working on project that's making use of the Katana/Owin pipeline. And I'm trying to use Owin to serve static files securely. Now, when I run the project locally through VS, everything works perfectly fine.
However, when I deploy it to a server (Windows Server 2008 R2, IIS 7), IIS has decided that it'll be damned before it lets any dirty managed handler manage its static files. Even when I've removed the static file handler. Even when I've added my own handler for a specific path. Even when I've told it to run All Managed Modules For All Requests. And since the path that's being passed in is a virtual path, IIS of course craps out and dies and either spits out a 500 or a 404 error. I'm not entirely sure what causes it to spit out a 500 over a 404, but anytime the request is deeper than 1 directory deep it gives out a 500 over 404. (/Client/Content/Folder/static.html(404) vs /Client/Content/Folder/SubFolder/static.html (500))
I'm just not sure where to go from here, at all. Worse still, when I've deployed to my local IIS (not running it out of VS, that is.) it works perfectly. It respects the web.config, the Owin middleware handles the static requests perfectly, the security is in place. Everything is peachy. Granted I'm running IIS 8 express on my box, but I'm not convinced that that is it.
I'm going to post my comment as an answer since the more I think about it, the more sure I am that it could be the issue.
Check that all necessary asp.net and IIS features have been installed correctly via Programs and Features - do a comparison between your dev and server environments. I've experienced essentially the same issues as yourself and this was usually the reason.
If this isn't the reason, check the IIS settings/Application pool settings make sure they are the on dev and production environments.
Now that the use of one of my asp.net apps has gone up significantly, two odd problems are occurring that are very infrequent, and that I cannot reproduce.
I am at a loss as to how to debug and troubleshoot these problems.
Here are two examples:
One of my aspx pages resets a session state value to 0 on !IsPostBack (is true). However, one of my users at a specific location frequently comes to that page when it is not a postback and the session state value does not get reset on his laptop. (I am basing this statement on how the app subsequently behaves, not on running in debug mode) But the code works and the session state is reset on my laptop when I am sitting next to him running the app on my laptop using the same browser on the same internet connection at the same time. And when this user runs the app on his laptop from home where he has a better internet connection he does not have the problem as frequently.
One of the aspx pages in my app does a server.transfer to itself after running code that saves data to a DB. Almost all the time after the server.transfer the textboxes contain their default value (as they should since !isPostback==True), but about 1% of the time the textboxes contain the previous value. I know that there has been a roundtrip to the server because data has been saved. This problem occurs on the same pcs using the same browsers by the same users doing the same actions. So 99% of the time it works correctly, and 1% of the time they do the exact same thing and it does not work correctly.
How do I even start trying to figure out what is causing these problems if they seem to be occurring randomly?
I suspect that the quality of the internet connection is the issue because it is the one variable that is changing, but how does that info help me?
It's not like I can debug either of these problems by running my app in debug mode.
I am using Asp .Net 3.5, C# 3.5 and the app is run in IE 6-8. (IE 8 in compatibility mode)
I would add logging to code where the problem is occurring. Then inform the users who are having the problem to try and note the time when they run into the issue. Once you have the logs and an approximate time, you can go in and pour over these logs to see if anything points you in the right direction. I would also look at your IIS and Event Logs on the server.
You can install Firefox Throttle plugin to simulate slow connections. Lot's of things can happen in ASP.NET with slow page loads. If the page isn't loaded fully but items are clickable ASP.NET can get really upset with event validation...etc
Also, I encourage you to start logging and tracing the problem areas in your application. You can then correlate that with the IIS request logs and get a fairly accurate picture of whats's happening when.
It seems like you're having problems with Session State. By default, ASP.NET uses InProc session state mode which uses server memory to store values. In many occasions, this can be lost or reset (app pool recycled). Switching to SQLServer Session State might help you solve the issue.
We have a long running process n the aspx page deployed in Sharepoint 2010. Assume that the process is Thread.Sleep(10 minutes) and logs that the process completes successfully in EventViewer.
Deploying the code in Domain A and B servers, things run fine. But after deploying the code in Domain C SharePoint server, then pages displays "Page cannot be displayed" in browser exactacly after two minutes.
Attaching HTTPWatch/Fiddler shows connection reset by server. Checking the IIS logs shows that the Connection was aborted/terminated.
Strange thing is the the server process gets completed even if the client sees the above error. The server log says that long running process completed.
Could this be a network issue? Firewall issue or Sharepoint 2010 server issue? We tried changing execution timeout in Templates\Layouts\web.config file but still no use. changed timeout values for AppPool account in IIS. Change the KeepConnectionAlive settings for the browsers. Nothing seems to work.
Any help is highly appreciated.
Thanks,
It may be an issue with incorrect DNS/proxy settings, AlternateMapping settings in MOSS Central Administration.
We have a C# web application, and the latest deploy doesn't work on our Windows Small Business Server 2008 (IIS7). The exact copy of that site runs fine on my Windows 7 machine (IIS7.5). The previous version and other builds still work on the Server 2008 R2 machine, but this itteration doesn't.
I've checked the W3SVC logs, but no requests are logged. I've checked the eventlog for errors, but no errors are logged. I also checked in fiddler, but the request just doesn't get a response as far as I can tell (Result column remains -)
When you open the url, the browser will just keep loading (no timeout).
Is there anything else I can check or enable to debug this IIS7 behaviour?
Thanks in advance,
Nick.
UPDATE
I published the application again & created a new site in IIS, and this new version works. While my the immediate problem is solved at this time, I would still like to know how to debug IIS7, see how it works & why it would keep loading infinitely.
First, I would drop a regular .html file into the sites directory. Then I would have a browser request that specific static file. This would bypass the .net engine and should be logged.
If for some reason it doesn't work and/or isn't logged then there are other things to check, let us know.
Assuming that it does serve the file and you are pointing to the correct machine then inspect your global.asax file and remove any type of error handling you might have. Also turn off the custom errors section of your web.config. Both of which could result in the server essentially spinning off into nothingness if improperly coded. If you have any type of additional threads you are spinning up on access, then see if you can turn those off or add additional logging.
Next, look in the HTTPERR logs to see if you can identify what's going on. These are located at
%SystemRoot%\system32\LogFiles\HTTPERR\httperr*.log
Info about this log file is at: http://support.microsoft.com/default.aspx?scid=kb;en-us;820729
If your app uses ADO then there is chance that depending where the build occurred on Windows 7 or not and whether SP1 is installed or not (at the time of the build) that your build is broken by some Micorsoft ADO-update contained in SP1 (see http://www.codeproject.com/Articles/225491/Your-ADO-is-broken.aspx).
If no requests are logged in the W3SVC logs then it probably means that IIS is not recieving the request at all - likely due to firewall configuration or similar.
You should diagnose why IIS is unavailable (for example by attempting to serve some static content) and then try again.
Try these:
re-register asp.net runtime with your IIS7
make sure the asp.net extension for the correct version is set to Allowed in 'ISAPI and CGI restrictions' in your IIS