Link to home
Start Free TrialLog in
Avatar of michouis
michouis

asked on

Write to Virtual Directory in IIS6 ASP NET using VB

I have deployed a new ASP.Net 2.0 web site on a Windows 2003 server using IIS6.

I have created a Samba share folder pointing to a folder on our Unix server.

I have created a virtual directory called WebOrders under my Web Site root directory.

How can I create text files in this virtual directory in VB code? How do i reference the virtual directory in VB code? I am doing this because no matter what I try I cannot specify the actual path to the Samba Share in my textfilecreate method without getting a User or password invalid error! Very frustrating! I hope this works.

I can create the text files on a local server folder no problem. Also when I run the Web Site on my dev. server (Windows XP file system type site) I can access the Samba share path no problem. Only in IIS6 do I have this problem. I cannot deploy because of this.

Do I really have to create a separate batch file that simply moves the files from a local folder to the Samba Share periodically? Seems silly. I should be able to access any network resource I need to, no?

Very frustrated.
Avatar of SalmanZG
SalmanZG

Run the web application under a user (identity) which has access to the samba share.
Local service accounts (default) don't have access to network shares.
Avatar of michouis

ASKER

Yes, if I understand you I should change the username/password in Directory Security to a valid Unix account and then set the <identity impersonate="True" /> in my web.config. If I do that then I cannot connect to our SQL server which uses Integrated Security for access. Then when I create a new user in SQL matching the username in Directory Security I cannot connect to SQL server using the new user account. SQL is set to Mixed Mode Authentication, I am not sure why it is not allowing the new user to connect. I have asked my net. admin. guy and he is stumpped too. If SQL would accept the new user I would then create that user in Unix and Samba which then should resolve all connection issues (ensure connections to both SQL and SAMBA), I would hope. Dunno why this has to be so complicated but it is. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of SalmanZG
SalmanZG

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok, done and working. Thanks.