socket programming?

G

Guest

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
 
P

Peter Chadwick (MCP)

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)
(e-mail address removed)
 
G

Guest

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.
 
P

Peter Chadwick (MCP)

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)
(e-mail address removed)
 
G

Guest

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?
 
P

Peter Chadwick (MCP)

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)
(e-mail address removed)
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top