Try to load htm page

My boss created some htm pages out of Excel that he would like me to incorporate into our vb.net intranet web site.  The hmt page will change over time and need to be reference outside the project (i.e. a network sharedrive). The first example code works fine, but when I reference a mapped full control permission network drive I get an error message System.IO.IOException: Logon failure: unknown user name or bad password.

This works:

       Response.ContentType = "text/HTML"
       Response.WriteFile("c:\inetpub\wwwroot\webapplication5\forms\bsc.htm")
       Response.End()

This code does not work when I reference a non-iis network drive with full control permissions:

       Response.ContentType = "text/HTML"
       Response.WriteFile("n:\production\forms\bsc.htm")
      Response.End()

Is this the best approach or should I be using another method?

detroitchassisAsked:
Who is Participating?
 
laotzi2000Connect With a Mentor Commented:
It's not as easy as that.
A network share is actually on another computer, but ASPNET is a local user and can not
be configured permission on another computer.
There is no easy way here if you have to do so, but it's not impossible.

Have a look at this article:
http://www.15seconds.com/issue/030926.htm
0
 
Type25Connect With a Mentor Commented:
Give your ASPNET user account permission on that folder where the file resides.
0
 
detroitchassisAuthor Commented:
I did a quick read of the referenced article.  It looks like the Com+ is a good solution, but at first appearance complicated.  Our intranet is about 25 users strong; since I'm relatively new to the organization, it will be my boss's call as to which way we go.  I’m hoping the case it is decided for us to go with the Com+ solution that I can continue to use you as a resource! I 'm willing to bump up the points to 500 if that make any difference.

Paul
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.