all groups > asp.net > february 2006 >
You're in the

asp.net

group:

mysterious error:


Re: mysterious error: George Ter-Saakov
2/7/2006 11:56:36 AM
asp.net:
I would suggest to drop the support of Webhost4life a line.
They were very helpful to me when I had a permission problem.

Although you gave full access to the folder you still might not have =
access to the file in that folder. It's easy to fix by setting flag on a =
folder level so every subfolder/file will inherit permissions.


George.
[quoted text, click to view]
I have some work which works well on my computer.
developed with VS.NET 2005 and its embeded web server.
Today (for the 1st time in many years, yeah!) I tried an upgrade of my =
website.

I have many problem, which I don't have on my computer :-(

for exemple, the simple handler (below) work well locally while it =
doesn't work on the remote server.
Even though I set Full permission to =
read/write/execute/killmartian/other for the ASPNET process on the =
App_Data folder, this handler:
=3D=3D=3D=3D=3D=3D=3D
<%@ WebHandler Language=3D"C#" Class=3D"test" %>

using System;
using System.IO;
using System.Web;

public class test : IHttpHandler=20
{
public void ProcessRequest (HttpContext context)=20
{
string file =3D =
HttpContext.Current.Server.MapPath("~/App_Data/testfile.txt");
using (StreamWriter sw =3D new StreamWriter(new =
FileStream(file, FileMode.OpenOrCreate, FileAccess.Write)))
sw.WriteLine("That did work!");

context.Response.ContentType =3D "text/plain";
context.Response.Write("That did work!");
}

public bool IsReusable { get { return false; } }
}
=3D=3D=3D=3D=3D=3D=3D
Fail with error:
=
'c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\App_Data\testfil=
e.txt' is denied.=20

[UnauthorizedAccessException: Access to the path =
'c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\App_Data\testfil=
e.txt' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) =
+2014243
System.IO.FileStream.Init(String path, FileMode mode, FileAccess =
access, Int32 rights, Boolean useRights, FileShare share, Int32 =
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String =
msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess =
access) +57
test.ProcessRequest(HttpContext context) in =
c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\test.ashx:12

Any ideas?
This is excruciatingly painful!

Or maybe you could suggest me a good (and not too expensive) =
ASP.NET2.0 webserver provider?

--=20
I have taken a vow of poverty. If you want to really piss me off, send =
mysterious error: Lloyd Dupont
2/7/2006 11:55:44 PM
I have some work which works well on my computer.
developed with VS.NET 2005 and its embeded web server.
Today (for the 1st time in many years, yeah!) I tried an upgrade of my =
website.

I have many problem, which I don't have on my computer :-(

for exemple, the simple handler (below) work well locally while it =
doesn't work on the remote server.
Even though I set Full permission to =
read/write/execute/killmartian/other for the ASPNET process on the =
App_Data folder, this handler:
=3D=3D=3D=3D=3D=3D=3D
<%@ WebHandler Language=3D"C#" Class=3D"test" %>

using System;
using System.IO;
using System.Web;

public class test : IHttpHandler=20
{
public void ProcessRequest (HttpContext context)=20
{
string file =3D =
HttpContext.Current.Server.MapPath("~/App_Data/testfile.txt");
using (StreamWriter sw =3D new StreamWriter(new FileStream(file, =
FileMode.OpenOrCreate, FileAccess.Write)))
sw.WriteLine("That did work!");

context.Response.ContentType =3D "text/plain";
context.Response.Write("That did work!");
}

public bool IsReusable { get { return false; } }
}
=3D=3D=3D=3D=3D=3D=3D
Fail with error:
'c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\App_Data\testfil=
e.txt' is denied.=20

[UnauthorizedAccessException: Access to the path =
'c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\App_Data\testfil=
e.txt' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) =
+2014243
System.IO.FileStream.Init(String path, FileMode mode, FileAccess =
access, Int32 rights, Boolean useRights, FileShare share, Int32 =
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String =
msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess =
access) +57
test.ProcessRequest(HttpContext context) in =
c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\test.ashx:12

Any ideas?
This is excruciatingly painful!

Or maybe you could suggest me a good (and not too expensive) ASP.NET2.0 =
webserver provider?

--=20
I have taken a vow of poverty. If you want to really piss me off, send =
Re: mysterious error: Lloyd Dupont
2/8/2006 12:00:00 AM
Yep, they did fix it!
[quoted text, click to view]
I would suggest to drop the support of Webhost4life a line.
They were very helpful to me when I had a permission problem.

Although you gave full access to the folder you still might not have =
access to the file in that folder. It's easy to fix by setting flag on a =
folder level so every subfolder/file will inherit permissions.


George.
[quoted text, click to view]
I have some work which works well on my computer.
developed with VS.NET 2005 and its embeded web server.
Today (for the 1st time in many years, yeah!) I tried an upgrade of =
my website.

I have many problem, which I don't have on my computer :-(

for exemple, the simple handler (below) work well locally while it =
doesn't work on the remote server.
Even though I set Full permission to =
read/write/execute/killmartian/other for the ASPNET process on the =
App_Data folder, this handler:
=3D=3D=3D=3D=3D=3D=3D
<%@ WebHandler Language=3D"C#" Class=3D"test" %>

using System;
using System.IO;
using System.Web;

public class test : IHttpHandler=20
{
public void ProcessRequest (HttpContext context)=20
{
string file =3D =
HttpContext.Current.Server.MapPath("~/App_Data/testfile.txt");
using (StreamWriter sw =3D new StreamWriter(new =
FileStream(file, FileMode.OpenOrCreate, FileAccess.Write)))
sw.WriteLine("That did work!");

context.Response.ContentType =3D "text/plain";
context.Response.Write("That did work!");
}

public bool IsReusable { get { return false; } }
}
=3D=3D=3D=3D=3D=3D=3D
Fail with error:
=
'c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\App_Data\testfil=
e.txt' is denied.=20

[UnauthorizedAccessException: Access to the path =
'c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\App_Data\testfil=
e.txt' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String =
maybeFullPath) +2014243
System.IO.FileStream.Init(String path, FileMode mode, FileAccess =
access, Int32 rights, Boolean useRights, FileShare share, Int32 =
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String =
msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess =
access) +57
test.ProcessRequest(HttpContext context) in =
c:\hosting\webhost4life\member\lloydd\TheCooksCompanion\test.ashx:12

Any ideas?
This is excruciatingly painful!

Or maybe you could suggest me a good (and not too expensive) =
ASP.NET2.0 webserver provider?

--=20
I have taken a vow of poverty. If you want to really piss me off, =
AddThis Social Bookmark Button