Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Error Logon failure: unknown user name or bad password when using StreamWriter

Posted on 2008-10-12
3
Medium Priority
?
2,164 Views
Last Modified: 2012-06-27
Hi,

 I am getting error Logon failure: unknown user name or bad password. when running the attached code

 I am trying to write to a network path (\\server\folder\)
 
Hope you can help me
using (StreamWriter sw = new StreamWriter(Path + cmbProduct.SelectedItem.Text +".product",false)) 
						{
							// Add some text to the file.
							sw.Write(ProductData);							
						}//using

Open in new window

0
Comment
Question by:negreteo
[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
3 Comments
 
LVL 5

Accepted Solution

by:
harwantgrewal earned 2000 total points
ID: 22700090
Hi negreteo
Are you aware of the exception associated with the SreamWrite? If not have a look at the following URL
http://msdn.microsoft.com/en-us/library/fysy0a4b.aspx

And make sure your application has rights to write files on that UNC path.

Thanks
Harry
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

604 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