When I try the webservice sample code "hello world" in the Visual studio .net 2003, I seem always have problem on authetication or authoraztion. I just remove the "'" according to the explanation in the comment to change serveral line of comment into code. and Press F5 to debug it . or try http://localhost/webservice1/webservice1.asmx in the brower.
At first, I got an error "Access denied". I thought it may be ananymous access from ASPNET account or IUSR-XXX need administrator authorization. I put them into administrator group. But it does not work. I also put debugger users group and VS developer groups have administrator authorization. It does not work. I got some other server-side error as "The Web server reported the following error when attempting to create or open the Web project located at the following URL". I also change some setting on dedault web site of IIS as application protection to Low and put ASPNET account or IUSR-XXX, debugger users group and VS developer groups all have administrator authorization . But I do not know why. As the explanation in the help or book, it should not be so difficult.
My environment: window 2000 server, IIS 5.0 Visual studio .Net 2003.
My question is for the simpliest webservice. If i only try in the IDE, what
do I have to set?
My email address:Bretthlin@hotmail.com or firstname.lastname@example.org
I would like to call methods that are written in visual c++ 6.0 from the .NET environment.
If you know how to do this, please explain in the most simple way.
And if you can also send me a sample I will be glad and thankful!
If you have a com or com+ file, you can simply add a reference in VS.NET to that file (VS.NET will automatically create a RCW, a runtime callable wrapper for the file which is like a sort of proxy between the unmanaged code and the managed code) and use it in your .NET code.
i'm developing a client-server application and now i need to fix my asynchronously receive of messages because sometimes the complete message is not received on a single OnDataReceived call. I've tried for example to send a 18000 bytes long message with a 40000 bytes long receive buffer but there're 2 incoming packets of 13000 and 5000 bytes. My OnDataReceive function is this
public void OnDataReceived(IAsyncResult asyn)
// SocketPacket is a class with the buffer of packet
SocketPacket socketData = (SocketPacket)asyn.AsyncState ;
int iRx = 0 ;
// Complete the BeginReceive() asynchronous call by EndReceive() method
// which will return the number of characters written to the stream
// by the client
iRx = socketData.m_currentSocket.EndReceive (asyn);
if(iRx > 0)
// this get client object/class data (nickname, receive buffer for this client, socket)
ClientSocketType client = GetClientSocket(socketData.m_currentSocket);
if(client != null)
// create a new receiving buffer for this server/client receive
if(client.PacketBuffer == null)
client.PacketBuffer = new MemoryStream();
// append received buffers to that buffer
BinaryWriter binwrite = new BinaryWriter(client.PacketBuffer);
binwrite.Write(socketData.dataBuffer, 0, iRx);
// if packets for this message are finished process message
// ?!? WORKING ?
// prepare the stream and send to a parsing function
MemoryStream stream = new MemoryStream(client.PacketBuffer.GetBuffer(), 0, client.PacketBuffer.GetBuffer().Length,true, false);
ProcessMessage(socketData.m_currentSocket, stream );