[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Write to Virtual Directory in IIS6 ASP NET using VB

Posted on 2009-05-08
4
Medium Priority
?
621 Views
Last Modified: 2013-11-07
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.
0
Comment
Question by:michouis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:SalmanZG
ID: 24340205
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.
0
 

Author Comment

by:michouis
ID: 24340630
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.
0
 
LVL 3

Accepted Solution

by:
SalmanZG earned 2000 total points
ID: 24340830
You should use a single account created as a Domain User. The same login should have permissions in each system.

Try to test each system separately in a simple manner - instead of testing from the application.

e.g. Use runas in command prompt to start sql managment studio under the desired login and test it. In similar manner, test samba share access.
0
 

Author Closing Comment

by:michouis
ID: 31579641
ok, done and working. Thanks.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question