Webservice error

S

shantanu

Server was unable to process request. --> Access to the path "\
\172.21.142.228\Downloaded Software\Downloads\VersionServer.txt"
is denied.
 
L

Laurent Bugnion, MVP

Hi,
Server was unable to process request. --> Access to the path "\
\172.21.142.228\Downloaded Software\Downloads\VersionServer.txt"
is denied.

That's a bit short, but... make sure that your ASPNET process has read
(or read-write, depending what you do) to that file. Remember that
ASP.NET doesn't run under the currently logged-in user, but has its own
account.

HTH,
Laurent
 
S

shantanu

Hi,
Server was unable to process request. --> Access to the path "\
\172.21.142.228\Downloaded Software\Downloads\VersionServer.txt"
is denied.

That's a bit short, but... make sure that your ASPNET process has read
(or read-write, depending what you do) to that file. Remember that
ASP.NET doesn't run under the currently logged-in user, but has its own
account.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog:http://www.galasoft.ch
PhotoAlbum:http://www.galasoft.ch/pictures
Support children in Calcutta:http://www.calcutta-espoir.ch

thanks for the reply
sorry for such a short post



actually i was writing a webservice to read a text file from the
server.........i am shering the code. On executing the code from a
client pc the error is generated What can be the possible reason also
how to give the ASP.NET permissions.


[WebMethod]
public string CheckVersion()//
{
try
{
string VerServer="";
string VerClient="";



System.IO.TextReader trServer = new System.IO.StreamReader(@"\
\172.21.142.228\Downloaded Software\Downloads\VersionServer.txt");
VerServer = trServer.ReadLine();
trServer.Close();

System.IO.TextReader trClient = new System.IO.StreamReader(@"C:\PRP
\VersionClient.txt");
VerClient = trClient.ReadLine();
trClient.Close();

if(VerServer!=VerClient)
{
// System.Net.WebClient Wclt = new System.Net.WebClient();
// Wclt.Credentials = netCred;
// Wclt.DownloadFile(@"http://fsdgurgaon:8000/FileSystems/
DownloadItem.aspx?filepath=E:\Downloaded Software\Downloads
\PRPSetup.msi",@"C:/PRP/PRPSetup.msi");

// System.IO.TextWriter twrClient = new System.IO.StreamWriter(@"C:
\PRP\VersionClient.txt");
// twrClient.WriteLine(VerServer);
// twrClient.Close();

status = "true";

return(status);
}
else
{
status = "false";
return(status);
}
}
catch(Exception Ex)
{
status = Ex.Message.ToString();
return(status);
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top