![]() |
socket programming?
I have an asp.net web page (vb.net) that talks to another pc via a port. I
can connect to the pc fine. When i connect to the pc via the port, its suppose to return me a file and then save that file to the web server under the web site directory. Well the file is not being saved to the folder. When i run the app in debug mode i can see the file coming acrossed but not being saved. Could this be a permission issue or something different? Has anyone ever done soemthing like this via a asp.net app? Now this same code for this class works in a winform application |
Re: socket programming?
Hi,
It sounds like it could well be a permissions problem. Especially if the same code works elsewhere. Does the user your website is running under have write/create permissions for the folder you are trying to save the error to? Do you get an error when trying to save the file to disk? Regards, Peter Chadwick (MCP) pete@code-explorers.com |
Re: socket programming?
I'm running the web app locally right now to test it out on a web server. I
gave the asp.net ID read/write access to the folder were it should write to. could it be something else? I'm not getting any write error while trying to save the file to disk from the web app either. "Peter Chadwick (MCP)" wrote: > Hi, > > It sounds like it could well be a permissions problem. Especially if > the same code works elsewhere. > > Does the user your website is running under have write/create > permissions for the folder you are trying to save the error to? > > Do you get an error when trying to save the file to disk? > Regards, > > Peter Chadwick (MCP) > pete@code-explorers.com > > |
Re: socket programming?
Hi,
Hmm. Interesting. So is it a case of the code runs normally but at the end of it there is no file created? I don't want to patronise you, but do you trap exceptions on the file output commands? I'm just struggling to think of situations where a file write would fail but no error would be raised? Have you tried stepping through the code line by line and watching all the variables? File content, filename, path etc.? I myself have had the situation of writing out a file failing before only to realise 2 hours later that I had the path wrong and it was working - just in a different folder! Failing that if you post your file code it may help to give us some clues... Regards, Peter Chadwick (MCP) pete@code-explorers.com |
Re: socket programming?
I'm stepping through it again and noticed in the class file i have
Public Event GetFile(ByVal strFilename As String) and where i get the file i have RaiseEvent GetFile(strFilename) and that is not being executed, any ideas on that? "Peter Chadwick (MCP)" wrote: > Hi, > > Hmm. Interesting. So is it a case of the code runs normally but at the > end of it there is no file created? > > I don't want to patronise you, but do you trap exceptions on the file > output commands? I'm just struggling to think of situations where a > file write would fail but no error would be raised? > > Have you tried stepping through the code line by line and watching all > the variables? File content, filename, path etc.? I myself have had the > situation of writing out a file failing before only to realise 2 hours > later that I had the path wrong and it was working - just in a > different folder! > > Failing that if you post your file code it may help to give us some > clues... > > Regards, > > Peter Chadwick (MCP) > pete@code-explorers.com > > |
Re: socket programming?
Hi,
Sorry about the delay in answering. I'm primarily a c# programmer so am not overly familiar with VB.NET, but the code you have to fire the event looks correct. Are you handling the event in the calling class? Have you tried stepping through the code - does the RaiseEvent line definately get called, i.e. does an error occur before that? Regards, Peter Chadwick (MCP) pete@code-explorers.com |
| All times are GMT. The time now is 09:18 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.