I am fairly new to IIS.
Hello, I am experiencing a very strange error once I publish my ASP.NET webpage onto IIS. The page functions fine while browsing, which makes several SQL calls for the menus and information on the site. This works fine both while debugging and when it goes live.
My problem is that after the user has made a couple of POSTs to update information in the live version, the page becomes unresponsive, or shows extremely high latency and returns nothing of the SQL requests that it was supposed to call. What could be causing this error?
The issue was that the server administrator forgot to give an application pool to the site. Hopefully this will help other people.
Related
I am beginner in web development. And I am working in an ASP.Net MVC 5 application and stuck with a very weird issue.
Issue:
Sometimes my web site just won't load in the browser. When I run in the local dev machine, website loads properly (localhost). But in LIVE the browser will keep on loading the website but nothing would load.
Also
After half an hour or so, website again kicks back in and starts opening properly.
Action I took:
Sometimes restarting the WebSite from IIS fixes the issue, BUT NOT ALL THE TIME. Sometimes even restarting did not fix the issue.
Also, I checked the Chrome Debugger, I do not see any error there (when the website was not loading).
I know something called ELMAH exists. Or some error logging in IIS. Can some one tell me how can I track this issue, in step by step process. Why my website will keep on trying to load in browser but will never load But after some time it loads. Is it IIS issue?
KINDLY NOTE: Once it starts loding fine, then even if I close the website and reopens it, It opens superfast like a flash. So the hiccups comes sometimes only.
I am willing to put more details, in this question. but I am not sure what to put. as far as IIS is concerned, all I know is how to restart and stop my website. that's it.
EDIT
Step 1: So, I searched event viewer as a whole in windows search and found something like below.
Edit 3
I checked the windows log, I do not see any issue related to my web app.
I know something called ELMAH exists.
Elmah is alogging framework. With just installing the NuGet package you already have an effective error logging mechanism in place. All unhandled exceptions will be logged with all the related information. It provides a page to visualize your logs and you can configure almost everything from security, to different back-end storages.
If you need a cloud base error logger with more advanced features you can use elmah.io.
Take a look at this post for a step by step guide on how to integrate elmah.
I have a website that I'm hosting on a public IP using IIS 7.0. (using c# asp.net 3.5)
I find that if I navigate to the webpage for the first time in a day. It loads endlessly and nothing shows up. Then when I re-press enter in the address bar, it loads right away and everything works fine.
From then on, when I got to the address again it loads quickly.
I don't think this is a compilation issue as all my code is pre-compiled.
Any ideas what might be causing this behavior?
Thanks!
Andrew
I had a similar problem which turned out to be caused by the IIS app pool recycling.
In my case, the website had outgrown its hosting package and as soon as it hit the arbitrary memory limit, the app pool was recycled and the application restarted, recompiling on the first page view.
You can check for this by adding a Global.asax and handling the Application_Start event. You could write logs to a database or send an email notification with whatever debug details you want.
I also handle Application_Error which offered up some useful info.
If you notice Application_Start happening several times a day, you may have a memory leak or similar issue.
I am having problems with my app running on IIS 7. The application is a mixture of classic ASP and ASP.NET MVC (don't ask how and why).
Anyway, the application is up and running except for some problems that I am experiencing. For example, I have a button on my page and when I click it, javascript is opening a popup which needs to contain .asp page. But that doesn't happen. I get the blank popup with my cursor on busy as it still loads. This is happening almost always to me in IE. In Firefox it is much better but sometimes the app jams there too.
If I close the opened, blank popup, and I want to move around the application, my buttons in menu (which are also .asp) doesn't load properly. For example, I have different buttons for different sections and when I move around they should change. When I restart the browser, only then everything works normal for some time, but the problem occurs again after a while.
I am very sure that it is not the problem in application itself, because it works properly on the machines of my colleagues without those problems. They have the same OS (Vista Professional) and we compared the settings in IIS and they match.
So I am very confused, and I really don't know how to solve the problem. I found a bunch of articles and blog posts about classic ASP and IIS7 but most of them are about enabling asp, which I already did.
So I am suspecting that something wrong with IIS, but I don't know what, tried to reinstall it, hoping for some improvement, but I had no luck.
If you need more details please ask.
Does anyone have any idea what should I try or do?
When debugging ASP.NET or ASP apart from the VS itself the most important tool you need is Fiddler (free tool from MS). This allows you to observe the http sessions the occur between your server and the client. This tool will give much greater visibility on what is actually happening underneath.
Next Step
So you now know that the problem is server side and the URL of the resource causing the problem. The next step is to debug the server side process by attaching to the w3wp.exe that is serving your site. If the resource specified by the URL is an ASP paged attach for script debugging or if its ASP.NET attach for Managed Code debugging. (Note for ASP debugging you will need to enable ASP server side debugging in the ASP settings in IIS manager).
You should place a break point on the first entry point of code for the resource. Now you can step through the code and discover where it is locking up.
I have a web application developed in ASP.NET 2.0, deployed in a data center. The application is a media portal with CMS.
The application is hosted in Windows Server 2008 and the database is SQL Server 2005 in Windows 2003 Server.
I have home page with numerous links to sub pages or articles. When I click on any of the links in home page, it will load the content of the page in article.aspx. My problem is with the delay of rendering the article.aspx page.
The status bar shows the progress of loading the new page. But the actual page render happens after few more seconds (20-30) after showing progress of page loads completes ie. after completing the progress bar in the status bar of my browser, the browser retains to show the current page and its showing a "Done" message in the left side if status bar. After 20- 30 seconds then the browser renders the desired page (article.aspx)
The speed was good initially and the performance came down almost after an year of hosting. What is happening here? Do I need to check anything with IIS or DB?
You have to check either it is database or code.
I agree with robert and suspect this is due to database. you can use sql profiler to find out what is going wrong.
If database is not the culprit then You have to use some kind of profiling tools to check what is going wrong.
As frogbot suggested asp.net trace is one way.
you can also use FireBug,YSLOW,Pagespeed as firfox plugin to help you.
RedGate's Ant Profiler is very good but it is not free.
Do you have any Ajax or other javascript code that render content in client-side runtime? This will happen hafter the page is loaded.
Sounds like your page loads are going to the database for data, maybe your populating a grid and some drop downs for instance. As the data has increased in the DB over time the queries have grown progressively longer to run and your page load has slowed as a result.
Perhaps the host now hosts more sites and more databases on the same servers which has also impacted the site.
Possibly just 1 bad piece of SQL taking 20-30 seconds to complete.
Network issues.
You need to enable tracing to see what's wrong. Check the articles here. If you find it is the database issue use SQL Server Profiler.
Okay, this is a weird issue that I've been having with a recent project I'm undertaking.
Occasionally, my website will stop functioning and anytime an ASP page is accessed, the browser will hang for many minutes before bringing up a correctly formatted HTML page with nothing in the tag. It seems to happen whenever more than one person attempts to access an ASP page, but I'm not positive it's isolated to those conditions.
Let me emphasize that the issue does not arise when accessing directories/HTML pages/other files. Only ASP pages are the problem. I am using lunarpages as a host.
My question is: Does anyone have any prior experience with such an issue, and if so, what are some ways to mitigate it?
Thanks in advance - let me know if I can provide any more pertinent information.
It sounds like it may be an issue with your Web Server. Do you have the correct version of .Net installed? Is your Web Server setup to host Asp.Net?