Visual Studio | ASP.NET Configuration error - asp.net

I have a problem as I have struggled with for a week.
Now I give up! I really can not figure out how to solve it. Every time I open the ASP.NET Configuration in VS10, then comes the first with this error:
**An error was encountered. Please return to the previous page and try again. **
If I then press:
How do I Use this Tool
so this comes up:
**Tool Has Timed Out
As a security measure, the Web Site Administration Tool times out after a period of inactivity. Changes to machine.config or web.config may also result in the tool needing to be restarted. To continue configuring your web site, restart the tool. **
Some who can answer me on what's happening here?

"Special characters in the path may be the problem, according to the posts." as Posted above by Dave Swersky
THIS worked perfectly for me! I had a special character ("#") in my folder path I removed this and removed spaces for good measure!
I was getting the error "Tool has timed out" among other errors when accessing the WSAT(Web site administration tool) from the ASP.NET configuration menu item.

I saw a post somewhere else that said the problems was solved when the default browser was changed to Internet Explorer. I have been using Firefox and have the exact same problem. When I changed the default browser to IE, the configuration page came up with no problem. But it won't work twice in a row without going in and setting the default browser back to IE each time. When I go back in to Program Access and Defaults, "Use by current browser" is selected. I have to reselect IE, and then it will work one time.

Judging by the Connect site, this error has been reported and is not well understood:
http://connect.microsoft.com/VisualStudio/feedback/details/118567/an-error-was-encountered-please-return-to-the-previous-page-and-try-again
Special characters in the path may be the problem, according to the posts.

This is what worked for me.
I'm using Visual Studio 2010 trying to create the membership role. I was trying to use the ASP.NET Configuration in Visual Studio.
Set the 'Default Browser' to Internet Explore.
To do this:
Right click on one of the .aspx pages you have under "Solution Explorer".
Select "Browse With..."
Select Internet Explore and Click on Set as Default.
Close the box.
Go back and click on "ASP.NET Configuration"
This will automatically open Internet Explorer.
Problem Solved :D
I guess what I was doing wrong was using Firefox as the default browser with Visual Studio. I'm guessing Visual Studio works good together with Internet Explorer since Momma and Daddy made them together (awww how cute)

The issue might be related to an application path that has spaces. After googling I managed to bypass the issue by appending the application path to the url manually ie.
http://localhost:{your_port_here}/asp.netwebadminfiles/default.aspx?**applicationPhysicalPath={path_to_your_application}&applicationUrl=/**

As a firefox user, I closed firefox then executed the "ASP.NET Configuration" option in VS2010. It automatically opens firefox (default browser) and now I am seeing WAT page contents.

Related

Visual Studio shows blank page when web application is run

I've had an occasional issue with my laptop where the power instantly cuts out - without the machine shutting down properly. This happened a couple of times yesterday while I was working on a project in VS 2013. Since then when I try to run the project the browser loads and the name of the start up page appears in the url box but it just shows a blank page.
Before, the page loading icon in the Chrome tab would swirl for a while as it was loading, but now it hardly does that at all, as if it's not even trying to load the page.
Some extra info:
I tried setting a different starting page - same result.
I put a break point in the page load code - it doesn't get hit.
If I view the source of the blank it is completely empty, not even
tags
Other projects seem to work find still.
I'm using VS 2013 on Windows 7.
Tried deleting the temp asp.net files
(c/windows/microsoft.net/framework64/v4.0.30319/Temporary ASP.NET
Files) but curiously this folder is already empty - I'm sure this is
what I've done with problem projects before - although I've never
seen this particular problem.
I'm running on IISExpress and have tried all browsers and running without debugging with the same result.
Has anyone seen this problem before? Any ideas??
Thanks
I had the same problem. Solved it by adding a break point at Application_Error function in Global.asax.cs. Then I was able to see the real problem. It was because of some conflicting dlls.
I had the same problem as well. Suddenly when I launch my MVC web application from Visual Studio 2013, the browser comes up and the app is running, but the browser displays blank, no url and does not even try to load the page. In Visual Studio, none of the Script Documents are loaded either.
Simply by setting a breakpoint in Global.asax.cs, Application_start, everything went back to normal, problem solved.

.net localhost website consistently making get arterySignalR/poll?transport=longPolling&connectionToken= calls

I created a new VS 2013 project and viewed the default.aspx page with the Firefox browser. When I check the net calls it has made, I see it making constant calls to:
http://localhost:50682/6a663a78019845d5ade4a328cad09cc2/arterySignalR/poll?transport=longPolling&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAOBmDwPWa2ky2MAZXFHBMVAAAAAACAAAAAAAQZgAAAAEAACAAAADSADQXBVKiKczflJ0OzUjOLduFTJE4zd%2FLHWGpDfXnuAAAAAAOgAAAAAIAACAAAACyEX81VwilygfphPoEKCYQ6ZwrkzExoKfZzEMkqBKqqzAAAADG%2BDJbrEFOfsNm9OKhqacnGseQvrwy5kmyZnI5YJiZbjYFgzMELXHfwA7Sxjj4osJAAAAAvQvoG4N0nn8eB9FRaJaZyqaUDF%2F9ypvGN%2B%2BVefnx8U1Fq6P9HXO9vEC%2BfA2s8R4jik58rD4IcFMjM4P8l5kv6g%3D%3D&messageId=d-F1180A0E-W%2C0%7Cl%2C4%7Cm%2C0&requestUrl=http%3A%2F%2Flocalhost%3A50656%2Fdefaulttest&browserName=Firefox&tid=4&_=1384207744328
Why is it doing that?
How do I stop those calls?
I see an infinite number of calls made to the above URL every 6 seconds.
Please help me understand this and fix this.
This is working as intended. Artery aka BrowserLink is a real-time connection from Visual Studio to all browsers running your code. It essentially allows Visual Studio to interact with every browser.
For instance if you have IE, Opera, Chrome and Firefox all running your code and you're trying to ensure cross browser correctness; instead of going to each browser and hitting f5 to refresh you can just click the browser link refresh button which will auto-refresh all of the pages for you.
Not everyone wants or needs to have this functionality so if you do want to disable it, as Gustavo Armenta said you can disable it by following the steps here: How can I disable __vwd/js/artery in VS.NET 2013?
I would recommend you to read this post first Browser Link feature in Visual Studio Preview 2013 to understand about this new feature that comes in with VS 2013.
And then to disable this, simply uncheck the "Enable browser link" option.
You can hide the polling requests from the Chrome developer tools Network tab so that the requests you are actually interested in become visible. You can hide the polling requests by adding a negative filter:
On the Network tab, click the filter button to open the filter options
Enter "-poll" without the quotes to hide the polling requests.
Example:
Had issues with that on site running with KnockoutJS framework. Pages were freezing for 10 seconds until "BrowserLink" external scripts were loading (using Chrome browser).
Issue solved by disabling "Browser link" feature in VS 2013
Steps How to disable "Browser link" (thanks to Gustavo Armenta for leaving comment with link in question)

Getting .asmx file in browser is fine, getting .asmx?WSDL returns an empty page

I created a webservice in a .dll and put this in the windows\assembly directory.
I followed all steps shown in the following URL and stopped at the paragraph "Creating a Windows Application to Consume the Web Service", because my consumer is a Lotus Domino agent:
http://msdn.microsoft.com/en-us/library/ms464040.aspx
There are two installations, where it worked just fine, now I did this on a third computer and when I browse the URL to the asmx file in a browser (IE9, Firefox 12 & Chrome 19) I get the normal answer from the IIS 7. But when I click on the link for the service description
(.../DominoImporter.asmx?WSDL) all I get is an empty page! IE9 shows the default 404 page and in Chrome I have a white page with no source. Firefox shows an error message, that describes the empty page with a header of type XML.
This doesn't work:
hostname/_vti_bin/DominoImporter.asmx?WSDL
This works:
hostname/_vti_bin/DominoImporterwsdl.aspx
I searched half this day for differences between the three installations / computers but found nothing!
All forum help found by Google also discussed other problems than mine.
I think there has to be someone, who already has experienced the same problem & can give me advice!?
Ok, now I found a solution, I deinstalled Visual Studio 2010 and after this I deinstalled Sharepoint Foundation 2010. Then I reinstalled Sharepoint Foundation 2010 and installed Visual Studio 2012.
Then when I load the WSDL again, the resulting web page in the browser isn't empty anymore!
Wrote this, maybe someone else might need this solution in the future.
Turned out, that my Sharepoint installation was corrupt. Couldn't clarify this before out of time pressure with a higher prioritized project.
comment following line in web.config of webservices project.
<add name="ContentTypeHttpModule" type="Porthos.Signup.Extras.ContentTypeHttpModule, ContentTypeHttpModule"/>
Right click your service and view in browser.
Click on Service description and it will show you wsdl.
Additionally it will also resolve updating web reference error.

Chrome returns "Bad Request - Request Too Long" when navigating to local IIS Express

I have a web application that runs perfectly fine when I use the Visual Studio 2010 development server (Cassini). However when I try to use IIS Express to host the site Chrome just displays a "Bad Request - Request Too Long" error. The IIS Express site does display in other browsers (FireFox and IE9) so I'm kind of confused. The error occurs in Chrome when I try request pages in my application or even basic resources like an image, so I don't think it is an issue with URL rewriting or routing.
Just to see if the problem was somehow a result of my site's code, I created a new MVC3 website and tried running that. This worked in the VS development server, but once again produced the "Bad Request" error when running under IIS Express.
I am about to start testing the site using some mobile devices so I need to get this running under IIS. Any suggestions would be greatly appreciated.
EDIT:
The root url of the site (http://localhost:50650/) is being requested using GET. I am currently using Chrome v12.0.742.112.
I get this all the time ONLY in Chrome and I have to clear browsing data to fix it.
Wrench > Tools > Clear Browsing Data
Check the following:
Clear browsing history
Clear download history
Empty the cache
Delete cookies and other site data
Then click "Clear Browsing Data" button and refresh your page.
UPDATE:
I figured out that it has to do with writing too many cookies to the browser and that if you just close all instances of Chrome, the error goes away for a while. To prevent it, you'll need to clear out your cookies programmatically.
Instead of clearing all the cookies, just do the following:
Right click the lock in the address bar area (see picture below)
Under cookies there is a link saying how many cookies are used
Click that link
Remove all cookies in there (or just the troublesome if you can identify them)
Problem gone
This error is caused by a corrupt cookie for the website you are trying to view, so to clear it all you need to do is clear the bad cookie(s) for that website.
In Chrome, go to...
chrome://settings/cookies
(Or manually go to Settings->Advanced Settings->Privacy->Content->All Cookies and Site data)
From there, you can search for cookies that match the site you are having problems on. Finally, click "remove all" for the matching cookies.
The problem is usually that the site in question has accumulated too many cookies or created cookies which are too large, making the HTTP headers swell beyond the allowed maximum.
One-time work-around
As has been mentioned, you can go to Settings|Advanced|Content Settings|All Cookies and Site Data, search for the site in question, and delete the cookies using the X button on the right. This reduces the header size of the HTTP request when contacting the site.
Long-term work-around
In addition to removing them one-time, however, you can prevent further problems with heavy cookie sites by going to Settings|Advanced|Content Settings|Manage Exceptions, and add the base site url (e.g. "msdn.microsoft.*" without the quotes) and select Behavior as "Clear on Exit". You might have to login more often to these sites, but this should prevent the problem.
I encountered this problem when using ADB2C login from ASP.NET WebApp. In Firefox you can do similar use case to delete related coockies and problem is gone for a while. Click on HTTPS (i) lock icon with, select ">" button on the right, select More information, select Security tab, click on View Cookies and click on Remove All. Done 4 a while.
If Above methods didn't work then enter
chrome://settings/resetProfileSettings
and Click on Reset Settings
This will reset your startup page, new tab page, search engine, and pinned tabs. It will also disable all extensions and clear temporary data like cookies. Your bookmarks, history and saved passwords will not be cleared.

Why would an aspx file return 404 ("The page cannot be found")

Why when I access an aspx (e.g., http://www.example.com/foo.aspx - not the real site) through IE6 would I get a 404 Error (i.e., "The page cannot be found") in IIS6
I've got scripts enabled for the website and I've tried with executables enabled as well.
Here is the full error:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or
is temporarily unavailable.
------------------------------------------------------------------------------
Please try the following:
Make sure that the Web site address displayed in the address bar of your
browser is spelled and formatted correctly.
If you reached this page by clicking a link, contact the Web site
administrator to alert them that the link is incorrectly formatted.
Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
------------------------------------------------------------------------------
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search for the
words HTTP and 404.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for
topics titled Web Site Setup, Common Administrative Tasks, and About Custom
Error Messages.
I can get to Default.htm in the same directory, so I know the path is right. I've opened it up to everyone (temporarily) so I know the permissions are right.
It could be a lot of things. I had this issue today because .NET had not been re-initialized after installing IIS (aspnet_regiis -i -enable or equivalent).
Check that the anonymous user under which the site runs has read access to the file foo.aspx.
IIS6 and later uses a 404 response, thereby not letting an attacker know whether such a file even exists.
I just happened to find another culprit for this issue. My foo.aspx page referenced a particular master page that had a <%# Register %> directive to a user control that did not exist. Removing the reference to the non-existent user control caused my foo.aspx to load instead of 404.
I found a solution here.
The real catch was using this:
Response.TrySkipIisCustomErrors = true;
The site is pointing to a different directory where the page is not.
It could be permissions, however I would think you would get an access error instead.
I'm assuming you are running IIS.
Check that www.example.com is going to the site that you think it is.
If you are hosting multiple sites on the same IP using host headers you may want to double check the name you are using is going to the site you think it is.
Ray and Joe probably have it. In order to serve any file type, IIS has to have a mapping for it. Aspx files require that they be mapped to the AspNet ISAPI dll, which the .Net installation normally takes care of. If you install IIS after .Net (and I'm sure there are other situations), you have to initiate this yourself by running aspnet_regiis.
ALTERNATE SOLUTION (same error perhaps different cause).
I had installed Visual Studio 2008 Pro without SQL Express it, and it caused this same error. Reinstallation of VS2008 with sql express included seemed to have corrected the problem, or perhaps the install took other actions. I did try to register ASP.net numerous times prior but no luck however it is definitely the most probable cause Just posting my experience for those pulling their hair as I was..
Thanks
If you register the .NET 4 version of IIS, you may find it's grabbed the registration of the aspx extension. If ASP.NET v4 is prohibited then 404 will be returned
I had this issue where some customers were reporting the 404.0 and some didn't have the problem at all(same page). I was able to navigate to any of the pages with no problems from my machine. Some customers would refresh and it would go away. I am using .Net 4.5.2 and IIS 7.5.
Looking at the IIS log file I would see:
sc-status sc-substatus sc-win32-status
404 0 2
sc-status.sc-substatus: 404.0 - Not Found
sc-win32-status: 2 - ERROR_FILE_NOT_FOUND
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
https://en.wikipedia.org/wiki/HTTP_404
I found the problem was I had deployed a new version of the website in which the old version of the website had RouteConfig.cs/FriendlyUrlSetting setup by creating a project using the web forms template. The new version was created using an empty template. So obvious to me now.. no URL routing. Customers had a cache issue with certain pages on their machine(no .aspx extension) and having them clear browser data ultimately fixed the problem.
I got this issue when I tried using a different drive to host my apps. I ended up moving them to the wwwroot folder because it was working there and I did not have to time figure out why it is not working on the E:\ drive.
I had bin\roslyn compiler missing. Adding that all worked fine.
Check for double quote errors. I started getting a 404 on a single page because I accidentally had this:
<asp:TemplateField HeaderText="ImageURL"">
instead of this:
<asp:TemplateField HeaderText="ImageURL">
For an aspx page, error 404 can be quite misleading! I have seen all the answers and they presuppose assuming various issues with the file, page, path, etc. but the simplest issues is the fact that if there is an error in your asp page (i.e bad format, improper usage of control, etc. asp will think the page does not exist and will post a 404 when in all actuality, it is easy to ascertain if there is a bad format by simply clicking on design mode. If the page does not render no need to do anything else but look at what is causing the render error, fix and viola'! Your page shows since it was never missing or can't be found, but it simple did not know how to display! Too often people go looking for the wrong solutions and waste so much time! Hope this helps somone. :-)

Resources