Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > socket programming?

Reply
Thread Tools

socket programming?

 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      01-19-2005
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
 
Reply With Quote
 
 
 
 
Peter Chadwick (MCP)
Guest
Posts: n/a
 
      01-19-2005
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)


 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      01-19-2005
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)
>
>
>

 
Reply With Quote
 
Peter Chadwick (MCP)
Guest
Posts: n/a
 
      01-19-2005
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)


 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      01-19-2005
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)
>
>
>

 
Reply With Quote
 
Peter Chadwick (MCP)
Guest
Posts: n/a
 
      02-01-2005
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)


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Steve Holden Python 1 02-03-2009 06:20 AM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Steve Holden Python 0 02-01-2009 12:45 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 0 02-01-2009 07:37 AM
socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 1 01-27-2009 05:05 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48,'Address already in use') Jean-Paul Calderone Python 0 01-27-2009 01:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57