473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Nov 19 '05 #1
5 1226
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)
pe**@code-explorers.com

Nov 19 '05 #2
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)
pe**@code-explorers.com

Nov 19 '05 #3
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)
pe**@code-explorers.com

Nov 19 '05 #4
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)
pe**@code-explorers.com

Nov 19 '05 #5
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)
pe**@code-explorers.com

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pyguy2 | last post by:
Issues of socket programming can be wierd, so I'm looking for some comments. In my python books I find exclusive use of socket.close(). From my other readings, I know about a "partial close...
5
by: John Sheppard | last post by:
Hi all, I am not sure that I am posting this in the right group but here it goes anyway. I am new to socket programming and I have been searching on the internet to the questions I am about to pose...
1
by: John Sheppard | last post by:
Thanks to everyone that responded to my previous Socket Programming question. Now I have run into some behavior that I don't quite understand. Programming environment. VS.NET 2003, C#, Windows...
5
by: mscirri | last post by:
The code below is what I am using to asynchronously get data from a PocketPC device. The data comes in fine in blocks of 1024 bytes but even when I send no data from the PocketPC constant blocks of...
2
by: djc | last post by:
I read a network programming book (based on framework 1.1) which indicated that you should 'never' use the RecieveTimeout or the SendTimeout 'socket options' on TCP sockets or you may loose data. I...
10
by: Uma - Chellasoft | last post by:
Hai, I am new to VB.Net programming, directly doing socket programming. In C, I will be able to map the message arrived in a socket directly to a structure. Is this possible in VB.Net. Can...
11
by: atlaste | last post by:
Hi, In an attempt to create a full-blown webcrawler I've found myself writing a wrapper around the Socket class in an attempt to make it completely async, supporting timeouts and some scheduling...
0
by: shonen | last post by:
I'm currently attempting to connect to a shoutcast server pull down the information from here and then I'll parse it. I got this working with the httplib, which was great, the problem is I want...
8
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi all, I am new to .net technologies. ASP.NET supports socket programming like send/receive in c or c++? I am developing web-site application in asp.net and code behind is Visual C#. In...
3
by: Stuart | last post by:
I am in the process of teaching myself socket programming. I am "playing around" with some simple echo server-client programs for m the book TCP/IP Sockets in C. The Server program is: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.