Opening a WebDav folder in Windows explorer fails on subsequent tries - webdav

I have a WebDav server built using the ITHit WebDav.Net classes.
I run the project in VS 2010 using IIS 7 (not the built-in dev web server) in release mode.
When the project starts up it launches IE and it displays a page that contains a button 'Browse using Windows Explorer'. The JavaScript code uses this span:
<span id="oViewFolder" style="behavior:url(#default#httpFolder)"></span>
to open Windows Explorer by calling oViewFolder.navigate(webDavFolderUrl), where webDavFolderUrl is:
http://localhost:80/WebDavApp/
I already mapped the webdav folder using the Windows Explorer Map Network Drive -> Connect to a Web site that you can use ... and so on.
The problem that I experience is that the button works fine at the beginning, it launches a Windows Explorer window, however, if I leave that IE page and go to another app, when I move back to the IE page the button stops working, i.e. it doesn't open Windows Explorer anymore (I closed it before), and it displays a custom error message (the message is not useful because the navigate function returns FAILED instead of OK). If I restart the WebDav server, it works again, but not always, sometimes I have to restart IIS for the button to work again. The WebDav server works though.
Has anyone experienced this behavior? Any resolution to get rid of it?
I am using Windows 7 64 bit, SP1 with all the updates up-to-date, and IE 9.

I created a bug for this issue.
You may use the next work-around:
Type in Windows Explorer
\\localhost#80\davwwwroot\WebDavApp\
The '#port' segment is optional if default port 80 is used.
You may create shortcut if your server address doesn't change.

Related

Newly created Asp.net Web App can ONLY RUN ONCE (in VS2017)

Intro:
When i run an asp.net web app that is freshly created, it runs just fine.
However, it runs only for the 1st time. Subsequent runs will fail with this message:
The only way to make it run again is to restart VS2017.
Not even restarting IIS/IISExpress will make it work again.
At this point my instincts tell me there is something stupid/silly going on. What on earth is going on here?
Here is my configuration:
I am using Visual Studio 2017 Version 15.8.4
.Net Framework Version 4.7.03056
Project: Asp.net Web Application (.Net Framework) ==> MVC
This is being run under - IIS Express (Internet Explorer)
Here are more details about the error im seeing:
The error page simply says "Can't reach this page".
When i click on the "More information" expansion link, i see following (mentioned above):
There was a temporary DNS error. Try refreshing the page.
Error Code: INET_E_RESOURCE_NOT_FOUND
Now, if i click on the "Fix connection problems" button, the Windows Network Diagnostics window popups up and says:
The remove device or resource won't accept this connection
If i click on "View detailed information" link at the bottom of this popup, i see following details:
The device or resource (localhost) is not set up to accept connections on port 'X' (where X is my localhost dev port).
Summary:
In the end, there is no real reason why port 'X' is not working any more. If i change the port number from Visual Studio the web app will run. But as i mentioned before, restarting Visual Studio will allow me to run for the 1st time.
* Updated *
I found a great work-around solution. Instead of running (F5), i
simply choose a view (.CSHTML) and execute that view itself
(right-click --> View in browser). This seems to work just fine every
time without messing up the port.

IISExpress not connecting when trying to debug

I'm working a ASP.NET MVC project in Visual Studio 2015 (14.0.25431.01 Update 3) that runs IISExpress to debug the application. However, sometimes (and I haven't figure out what the trigger is) when I debug the application my browser will open to the correct URL but it will just say "Unable to connect".
If I try to refresh the window nothing changes. If I check Visual Studio it still says it's debugging so the debugger or IIS doesn't seem to have crashed. Sometimes if I just click Restart it will work fine. However, sometimes this error continues and I have to kill the IIS process. I've tried deleting the files under .vs\config but that didn't help.
Is there any way to fix this or anyway to find some logs to see whats happening? This started in the last few weeks and it starting to drive me crazy.
Edit
Happened again and tried connecting via Chrome as well as my usual FireFox. Looking at the developer tools in Chrome I'm seeing the ERR_CONNECTION_REFUSED message.
I decided to check the Windows Event Viewer and found that it looks like IIS Express can't bind to the port.The error message is:
Unable to bind to the underlying transport for [::]:12345. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine. The data field contains the error number.
But why it can't bind to that port I don't understand.

VS2010 Debug web app causes "cannot start application" and "access denied" errors

When I try to debug my VS2010 web app (F5), the IE web browser windows pops up but then freezes, and my VS2010 IDE window pops up an error message:
Unable to start program 'http://localhost:nnnn/Login.aspx'.
Access is denied.
I'm running VS2010 (10.0.30319.1), targeted to ASP.NET 4.0 (4.0.30319), in non-administrator mode, with ASP.NET debugging enabled, on 64-bit Windows 7 Enterprise SP1, with IE 9 (9.0.8112.16421 with update 9.0.29).
This web app and others I work with have been working just fine for several months, but they all started to misbehave in this manner a few weeks ago. At first, the first time I tried to debug (F5) I'd get the error, but after clearing it and closing the IE window and trying F5 again a second time, the browser would come up just fine. I assumed it was just some glitch, so I tolerated it.
Lately, though it has gotten worse, to the point that 90% of my attempts and re-attempts to debug the web app cause a hung browser and the error. It sometimes works, but most times it doesn't. I have to kill the handing iexplorer.exe processes to clean up my user space, otherwise I eventually get a message about not having enough files to start the browser. I try rebuilding, stopping the ASP.NET Development Server process, even exiting VS2010 and restarting it, but I can't seem to find the magic sequence of events to get it to work.
If I start without debug (Shift-F5), it works, but two IE web browser windows are opened, and both attach to the web app. I don't know if this is related to the first problem. And needless to say, this does not really allow me to debug my code. I tried attaching to either of the IE processes, but I still could not get the debugger to actually debug the executing app. (There is a message about no symbols being loaded for the attached process.)
Most of the solutions for this problem I've found say something about running with administrator access. I cannot do this, however; I work at a large financial company, and developers are not allowed to have local admin rights on our PCs. I don't control system patches, but I can request Help Desk ticket to resolve the problem; but I'd like to resolve this problem myself if it is a fairly simple configuration problem on my part.
Addendum
I should also add that I am not using IIS (because I don't have it installed on my system, and I can't use it anyway because I don't have local admin rights), but instead I am using the built-in Visual Studio Development Server. I've also selected a specific HTTP port number for it to use. Also, all of the directories I'm been using were created by me (as part of my project workspace), so there should be no access permission problems.
Like I said, I can sometimes get a debugging web session started, but most of the time I can't. So whatever is causing this problem, it is probably something intermittent.
This tend to occur when you try to run the full version of IIS rather than the Visual Studio Web Server or IIS Express. Have you tried running IIS Express instead? I think there's support for IIS Express that came with one of the later updates to VS 2010?
IIS proper definitely requires full admin rights in order to attach a debugger because full IIS runs under a system account rather than your own account. IIS Express (as well as the Visual Studio Web Server) however should run under your own user account and so debugging should work on the local machine even with a non-admin account.
One issue that might cause problems is directory permissions. Make sure that the folder where your Web files live are read/execute accessible through the file system for your user account.
Finally make sure you don't have some other instance of a Web service running on the same HTTP port.
I am having the same issue, it works when i don't choose to debug but CTRL+F5 to start it. F5 Debugger al

Debugging Websites with Google Chrome

When writing an ASP.NET website, Visual Studio allows me to specify which browser to use for debugging. I've just started playing with MVC 3 and I'm not seeing any such option.
With MVC, debugging occurs in Google Chrome, which is fine except that Visual Studio doesn't recognize when I've closed the browser. I must then manually shut down the debugger.
Is there a way to either A) have the Visual Studio debugger recognize when I've stopped debugging the website in Chrome, or B) specify that IE should be used when debugging? (I prefer to keep Chrome as my default browser when browsing the Web.)
When you debug a web application, Visual Studio simply attaches itself to the IIS process (or the development server process, if you're using that), and starts the browser with the correct URL. The browser doesn't even know you're debugging. With IE, Visual Studio performs some additional inter-process voodoo to detect when IE closes; other browsers however are unaware of this mechanism and simply do what they always do - display the page until the user closes it. So your choices are:
Live with the fact that you'll have to close the browser manually
Reuse browser windows (instead of running the browser from inside Visual Studio, use "Attach to process" and open the page manually)
Bite the bullet and use IE
I believe this extension allows you to choose your browser with MVC applications. Or, you could just add a normal HTML page, and set the browser default on that. This should become the default for the rest of your project.
To keep IE as you browser right click on an aspx file and click browse with. you should be able to set a default from there.
If you don't have an aspx form just create one, set pref then delete.

can't debug asp.net - "unable to start program"

I cannot debug an asp.net application. Nothing was changed or installed on purpose, maybe some automatic updates, which I thought were turned off. Just woke up one day and whenver I try to debug, I get the mesage "Unable to start program http://localhost:49404/Default.aspx". This is Visual Studio 2008 on Vista Business 64 bit. Facts:
-neither applications that use IIS or the built in webserver will debug
-applications will run without debugging (debug build, just run)
-visual studio, iis, and the dot net 3.5 sdk have been reisntalled.
Any ideas? This is going on days trying to figure this out. About to reisntall vista.
Brian
Did the addressing change? Is the site still on port:49404?
Have you any antivirus running on your vista box? Which one?
When you start debugging, a little cloud appears on the bottom right side of your screen, it indicates the port cassini's server is running on. Is this port the same as 49404?
Here are some pointers and tips:
check the output of this program \Windows\Microsoft.NET\Framework\v2.0.XXXX\WebDev.WebServer.exe
Did your default project change?
Is your default browser working correctly?
Before you reinstall OS you may want to
reinstall ASP.Net (aspnet_regiis.exe)
reinstall your default browser
Crazy, but may solve the problem. Try this:
Start without debug (ctrl+F5), and when IE opens, start again in debug mode (F5).
Dont exit from IE, just stop debug in VS2008.
I had this exact problem with Visual Studio 2008. The solution was to set the default web browser that VS uses to a real browser (e.g. IE) and not the "Internal Web Browser".
Right click on an ASPX file in your project and select "Browser With...". This lets you select the default browser to use when you select the "View in Browser" option and for when you debug/run the app (this is key).
Select your favourite browser (i.e "Internet Explorer") and click on "Set as Default". Do not pick "Internal Web Browser".
Debug away! Your app should come up in your browser now and debug as normal.

Resources