Saturday, March 31, 2012

Sharing folders required?

Read the steps I followed, and I've got a simple question at the end:

1. In IIS, I created a virtual directory, http://localhost/testing1 in

C:\Documents and Settings\mendhak\My Documents\Visual Studio Projects

2. In VS.NET I created a new Web Project and specified http://localhost/testing1

3. I created an extremely simple page (a page with a button on it), and when I tried to view it, I got "security permission" errors.

4. I went to C:\Documents and Settings\mendhak\My Documents\Visual Studio Projects and shared testing1 (like a network share) and when I refreshed the erroneous browser, it worked fine.

My question is: Is this sharing of folders necessary?FROGBUMP
You don't have to share it with all. You just need to give the asp.net account access to that folder. This is just to make sure security is in place. If they didn't do this, that asp.net account could do anything on the machine...which isn't good if a hacker hacks your app and makes it do things it wasn't designed to do.
OK. I'll check this tonight and get back to this thread if there's a problem.
Lets make this a little more clear, you still have to web share the folder, otherwise it isn't going to work, but that should be taken care of when you map the folder as a virtual folder in IIS.
No luck. Here's the error page I get:

(attached .txt file, rename to .html)
Since you are doing it in your Document and Settings, it would need to be shared I believe, so yes, you would have to share it because that folder is only for you on that computer unless you specifically set the permissions otherwise. Other users are not supposed to be able to get to your documents.
Thanks a lot for the responses!

BTW, I also did a little experiment.

I uninstalled and reinstalled Visual Studio, and after the reinstall, I noticed that C:/WEB was shared!

So to avoid all the hassle, I created a folder, C:/WEB/ASPDOTNET/, and use that for all the web applications that it'll be creating.

Much appreciated! :afrog:
Mendhak,

I recently installed the Microsoft .net example tutorials. I tried to make the tutorial public but I had similar problems to you.

In the end I created the virtual directory in IIS for QuickStart (or whatever alias you are using) and in Windows explorer I shared the folder for default IUSR_xxxxxx.

This should work for you.

But I still have a problem when I run some tutorials that arent security related, some trace messages appear -

My pages are on http://www.adoanywhere.com/dotnet

Feel free to share any knowledge, this is new to me..

0 comments:

Post a Comment