B
Bhavesh
Hi everybody,
I have problem in copying file from DatabaseServer to WebServer.Both
machines are on LAN.
Let me explain in details what i am doing & wht i want to achieve...
I am using sqlserver 2000 & asp.net 2005 for my project..
I have written one stored procedure which creates one Text file on
database server.. & i want to copy that file in virtual path of my
project on webserver..
I am using following statement to copy a file..
strTextFileName = "E:\DestinationReportText\"
File.Copy(ConfigurationManager.AppSettings("ExportToTextFolderForCopy")
& ViewState("ReportName") & ".txt", strTextFileName)
and in web.config following is the value
<appSettings>
<add key="ExportToTextFolderForCopy" value="\\DBServerCompName
\Report_Text\" />
</appSettings>
When i debug code on webserver then everything works well, but when i
run this code from IIS on same machine then it gives following
Error ..
/*************************************************************
Server Error in '/www' Application.
--------------------------------------------------------------------------------
Logon failure: unknown user name or bad password.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.IOException: Logon failure: unknown user
name or bad password.
***********************************************************/
and to solve this I have given Full permission for "Report_Text"
folder to admin user, to anonymous user, & tried other lots of
stuffs,, but cound not make it to work...
is any one have idea on this ?
I have problem in copying file from DatabaseServer to WebServer.Both
machines are on LAN.
Let me explain in details what i am doing & wht i want to achieve...
I am using sqlserver 2000 & asp.net 2005 for my project..
I have written one stored procedure which creates one Text file on
database server.. & i want to copy that file in virtual path of my
project on webserver..
I am using following statement to copy a file..
strTextFileName = "E:\DestinationReportText\"
File.Copy(ConfigurationManager.AppSettings("ExportToTextFolderForCopy")
& ViewState("ReportName") & ".txt", strTextFileName)
and in web.config following is the value
<appSettings>
<add key="ExportToTextFolderForCopy" value="\\DBServerCompName
\Report_Text\" />
</appSettings>
When i debug code on webserver then everything works well, but when i
run this code from IIS on same machine then it gives following
Error ..
/*************************************************************
Server Error in '/www' Application.
--------------------------------------------------------------------------------
Logon failure: unknown user name or bad password.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.IOException: Logon failure: unknown user
name or bad password.
***********************************************************/
and to solve this I have given Full permission for "Report_Text"
folder to admin user, to anonymous user, & tried other lots of
stuffs,, but cound not make it to work...
is any one have idea on this ?