How to use UNC and VNC Path in Web Services .Net


Some time we get file path not found error when we use network path. To overcome this problem we need some setting

1. Setup IIS to Allow us to Use Network files and Folder
Configure Web Server.
a)Control Panel > Administrator Tools > Computer Management > In Computer
management Expand the Tree " Local users and Groups" And click on Users, From
the right side list of users, select the IUSR_<MACHINENAME> AND Right click and
click on Set Password.
b) now click on Proceed
c) Now open the IIS, And Right click on Application's Virtual Directory.
Click on Properties, so one popup will appear, now go to "Directory Security"
Tab. And Under "Anonymous Access and Authentication Control" click on Edit
Button
d)Uncheck the "Allows IIS to Control Password" Check box and type the password,
that you have set in Previous steps. For user IUSR_<MACHINENAME>click Ok and
apply settings

Configure File Server.
a)Open Control panel > Administrator Tools > Computer Management > Click on
Local Users and Groups Select the Users folder > so list of existing users will
appear.

Right click on Blank Space, and click on "New User"
b)Enter same user name that you have on WEBSERVER.
c) And also enter same password that you have set for
User "IUSR__<MACHINENAME>" for web server PC.
d) Un Check the "User must change password at next logon" check box and
Checked on "Password Never Expired" So now in Both Server (File and Web), Same
User exists with Same Password.
e) Now locate the Directory, and set Permission for IUSR_<MACHINENAME>"
User.
f) If IUSR_<MACHINENAME>" user is not exists in "Group and User names",
then add and set permission.

2. Enable Impersonate in Asp.net.

a) Add to web.config file.
<system.web>
<identity impersonate="true"/>
</system.web>
only for "IIS Authenticated Account or User"

a) Add to web.config file.

<system.web>
<identity impersonate="true" userName="IUSR__<MACHINENAME>"
password="password" /> </system.web>
For Specific user for all request so we are entering username as
a "IUSR_<MACHINENAME>" and password.


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: