Wednesday, March 28, 2012
Trouble developing on remote web server.
Server. Installed remote debugging tools on server. When I try to run the
app, I get the following error.
"Error while trying to run project: unable to start debugging on the web
server. Not enough storage is available to complete this operation."
I've checked disk space both on the development box and the server. Plenty
(gigs) of space available. Is there anything else that could be causing this
error?
Thanks.I am experiencing the same problem. Did you find a solution? Does anyone
else have information on this issue?
Thanks,
Nathan
"Terry Olsen" wrote:
> Running VS.NET 2003 on WinXP pro. Created ASP.NET Web App on remote Win200
3
> Server. Installed remote debugging tools on server. When I try to run th
e
> app, I get the following error.
> "Error while trying to run project: unable to start debugging on the web
> server. Not enough storage is available to complete this operation."
> I've checked disk space both on the development box and the server. Plent
y
> (gigs) of space available. Is there anything else that could be causing th
is
> error?
> Thanks.
>
>
Monday, March 26, 2012
Trouble developing on remote web server.
Server. Installed remote debugging tools on server. When I try to run the
app, I get the following error.
"Error while trying to run project: unable to start debugging on the web
server. Not enough storage is available to complete this operation."
I've checked disk space both on the development box and the server. Plenty
(gigs) of space available. Is there anything else that could be causing this
error?
Thanks.I am experiencing the same problem. Did you find a solution? Does anyone
else have information on this issue?
Thanks,
Nathan
"Terry Olsen" wrote:
> Running VS.NET 2003 on WinXP pro. Created ASP.NET Web App on remote Win2003
> Server. Installed remote debugging tools on server. When I try to run the
> app, I get the following error.
> "Error while trying to run project: unable to start debugging on the web
> server. Not enough storage is available to complete this operation."
> I've checked disk space both on the development box and the server. Plenty
> (gigs) of space available. Is there anything else that could be causing this
> error?
> Thanks.
>
Thursday, March 22, 2012
Trouble with File Paths
Hi,
On my development machine I am using VB/ASP .net 2.0, IIS 5.1 , Windows XP Pro. The test server has Windows Server 2003, IIS 6.0.
I am trying to access my config settings located in an .xml file I created (SQLMessageSettings.xml).
The physical location is: C:\VB.Net 2.0 Projects\SQLMessageViewer\SQLMessageViewer\SQLMessageSettings.xml
When I run the application it runs from IIS (not VS Development Server) as a virtual IIS application.
I thought that to access the "SQLMessageSettings.xml" file I can use the file path "/SQLMessageViewer/SQLMessageSettings.xml" and it would start at the root of my website and find the file.
Instead I get an error "Could not find a part of the path 'C:\SQLMessageViewer\SQLMessageSettings.xml'."
If I remove the initial "/" the error is "Could not find a part of the path 'C:\WINDOWS\system32\SQLMessageViewer\SQLMessageSettings.xml'."
The only way it works is if I put the entire file path in (C:\VB.Net 2.0 Projects\SQLMessageViewer\SQLMessageViewer\SQLMessageSettings.xml).
When I changed the app to run from the VS Development Server it worked with only "SQLMessageViewer/SQLMessageSettings.xml"
I know I am missing something here. Part of the problem is that I don't fully understand all the architechture of IIS as to how a Website, Virtual Application and Virtual Directory all relate to each other.
How can set it up so I don't have to put the entire physical file path?
Would the tilde, "~", help me in anyway?
Also is there a way to do it so that I won't have to change the file path reference when I move it to the test server even though the physical location of the files are different?
Thank You,
Oran
As far as I know, you always have to use the full path to access a file on the server using the filesystem object. But, you can MAP the path from your current app. I think this should work
Dim FilePath as string = Server.MapPath("./SQLMessageViewer/SQLMessageSettings.xml")
Hi,
I think ~ should help you to solve the problem. ~ points to the root folder of your web application and then you can specify the path as you require.
Hope this helps to solve the problem
Good Luck
Regards
Vineed
Thanks for the suggestion but when I tried the "~",
"~/SQLMessageViewer/SQLMessageSettings.xml"
I got this:
Could not find a part of the path 'C:\VB.Net 2.0 Projects\SQLMessageViewer\~\SQLMessageViewer\SQLMessageSettings.xml'.
That is the right file path except for the "~."
I decided to get rid of the extra "SQLMessageViewer" folder and put everything where the .sln file is and it didn't help.
I tried this:
"~/SQLMessageSettings.xml"
and got this:
Could not find a part of the path 'C:\WINDOWS\system32\~\SQLMessageSettings.xml'.
Thanks,
Oran
Hi Oran,
Try usingRequest.ApplicationPath. This property returns the Virtual path of the Web applications Root folder. To this path you can add the path of your file as required. If you are not comfortable using the Virtual Path then you can also try using theRequest.PhysicalApplicationPath. This would return the Physical Path of the Web Application's root folder. You can again add the path of the file as required.
Hope this helps to solve your problem
Good Luck
Regards
Vineed
Try this
Server.MapPath("~/SQLMessageViewer/SQLMessageSettings.xml")
Assumption is that SQLMessageViewer is a folder inside your website
Hi,
My team has built a configuration component based on the provider model allowing the developer to store the config settings wherever he wants (database, .config file, .xml file ...). The component is a class library compiled to a dll (CommonConfig.dll). The dll is meant to serve both windows apps and web apps. The code in the commonconfig.dll that loads the xml file looks like this:
xd =New XmlDocument()xd.Load(MyBase.Location)
The location (file path, database connection) of the config settings is stored in the web.config (or app.config) file like this:
<ConfigSettingslocation="~/SQLMessageSettings.xml"type="Common.Config.CommonConfig.XmlCommonConfigProvider"/>
Does "server.mappath" work in a windows app? Is it only a matter of importing the right namespace (which one?)? We can make 2 versions of the CommonConfig.dll one for web and one for windows, but we would like to avoid that if possible.
I was hoping that there was a way to locate the file with only the file path (and without having to write out the entire path). It could be there is no better solution, but it is strange that when I changed the app to run from the VS Development Server it worked fine with "SQLMessageViewer/SQLMessageSettings.xml" (See original post).
Thanks,
Oran
System.Web.HttpContext.Current.Server.MapPath is the fully qualified name . Well in your config dll, you can check if the httpContext.Current is empty .. if so then its not a web app so with this check your config dll can decide how to pull the config file
Thanks Jeev! Your solution works for both windows and web (on both servers).
I don't understand why the tilde doesn't work on its own without server.mappath?
Oran
Tuesday, March 13, 2012
Troubleshooting asp.net on XP Pro
I know it's not my code because the files will work if I move them to my company's web server (Shhh, don't tell).
I set up IIS and made a virtual directory that points to a partition where I'm putting the files.
I have the .NET Framework 1.1 and ran a windows update today.
Here is an example of a problem. This For...Next statement is supposed to write a sentence 7 times in different sizes. If I load the page in my browser it displays:
> Hello and Welcome!
Here is my code:
1. run aspnet_regiis.exe
<%@dotnet.itags.org.Page Language="VB" Debug="True" %>
<html>
<head>
<title>Hello and Welcome Page</title>
</head>
<body>
<center>
<% Dim TextSize As Integer %>
<% For TextSize = 1 To 7 %>
<font size = <%=TextSize%>>
Hello and Welcome!<br>
</font>
<% Next %>
</center>
</body>
</html
2. make sure you're requesting the page via HTTP and not just from the filesystem.
When I try to run Aspnet_regiis.exe I get an error message:
The application Failed to initialize properly. (0xc0000142)
Wonder if this is my problem?
Oh, I see I have to run that command from a Visual Studio command prompt. I will try that.
aspnet_regiis.exe -i fixed the problem!
Did you tried with -i ?