|
i had done a system and set it in a .msi install package. to run setup in silent install mode, i have type command in command prompt like below:
msiexec /i myinstallationname.msi /qn
how to when we start install and then the above command will automatic call without manually key in in command prompt??????
can this done by creating a .bat file or .inf file?? if can, please let me know how to create and write.
Thanks.
|
|
|
|
|
To create a batch file just create an empty file with .bat ending (in the same folder as the msi) and copy your command into it.
|
|
|
|
|
Hi.
I have some proplem about Program Pinging. I develope program windows form pinging using microsoft.net framework It can to run under user administrator. But if I login to be user domain it can't using function pinging and appear error below
System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions at System.Net.Sockets.Socket.SendTo
Thank anybody to help
|
|
|
|
|
|
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 linhchnn@yahoo.ca
llllhhhh
|
|
|
|
|
Please try put this code into file web.config and run again
<authorization>
<allow users="*" />
</authorization>
lekchin
|
|
|
|
|
I have one problem I don't know how to refresh the panel
(pane.Refresh()-don't work).
I drawing on panel like:
Graphic g = panel2.CreateGraphics();
g.DrawLine(new Pen(Color.Blue), 100,100,200,200);
....
How to Refresh, please help me!
|
|
|
|
|
Hi,
Try this instead.
private void panel1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Refresh();
}
Hope it helps.
Cheers.
Regards,
Chua Wen Ching
Visit us at http://www.necoders.com
|
|
|
|
|
Doesn't it seem like this will be the order of events?
* (Your code) Create graphics object
* (Your code) Draw on pane
* (Your code) Refresh pane
* (WinForm code) Clear background (thus removing your previous drawing)
* (WinForm code) redraw pane
It might be that your drawing is getting painted over when you refresh your pane.
You can create a delegate and add it to the pane.Paint event, then draw using the supplied graphics object.
-
Drew
|
|
|
|
|
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!
thanks in advance
sheli
|
|
|
|
|
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.
Gidon
|
|
|
|
|
Can you please send me an example of such com or com+ file?
thanks
sheli
|
|
|
|
|
Hi,
You can look into p/invoke! Just assume that you have a C++ dll, and you want to call into your C# application.
[DllImport("yourapp.dll")]
internal static extern int SomeMethod();
Hope it helps.
Cheers.
Regards,
Chua Wen Ching
Visit us at http://www.necoders.com
|
|
|
|
|
Hello,
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
<br />
public void OnDataReceived(IAsyncResult asyn)<br />
{<br />
try<br />
{<br />
<br />
SocketPacket socketData = (SocketPacket)asyn.AsyncState ;<br />
<br />
int iRx = 0 ;<br />
iRx = socketData.m_currentSocket.EndReceive (asyn);<br />
if(iRx > 0)<br />
{<br />
ClientSocketType client = GetClientSocket(socketData.m_currentSocket);<br />
<br />
if(client != null)<br />
{<br />
if(client.PacketBuffer == null)<br />
client.PacketBuffer = new MemoryStream();<br />
<br />
BinaryWriter binwrite = new BinaryWriter(client.PacketBuffer);<br />
binwrite.Write(socketData.dataBuffer, 0, iRx);<br />
<br />
if(asyn.IsCompleted)<br />
{<br />
MemoryStream stream = new MemoryStream(client.PacketBuffer.GetBuffer(), 0, client.PacketBuffer.GetBuffer().Length,true, false);<br />
ProcessMessage(socketData.m_currentSocket, stream );<br />
<br />
client.PacketBuffer = null;<br />
}<br />
}<br />
<br />
WaitForData( socketData.m_currentSocket );<br />
}<br />
else<br />
{<br />
((SocketPacket)asyn.AsyncState).m_currentSocket.Close();<br />
RemoveSocketFromList(((SocketPacket)asyn.AsyncState).m_currentSocket);<br />
AddLogMessage("Disconnected user"); <br />
}<br />
}<br />
catch (ArgumentNullException se)<br />
{<br />
AddLogMessage(se.Message ); <br />
}<br />
catch (ObjectDisposedException )<br />
{<br />
System.Diagnostics.Debugger.Log(0,"1","\nOnDataReceived: Socket has been closed\n");<br />
}<br />
catch(SocketException se)<br />
{<br />
AddLogMessage(se.Message );<br />
if(se.ErrorCode == 10054)<br />
{<br />
((SocketPacket)asyn.AsyncState).m_currentSocket.Close();<br />
RemoveSocketFromList(((SocketPacket)asyn.AsyncState).m_currentSocket);<br />
AddLogMessage("User disconnected: no ping received");<br />
}<br />
}<br />
}<br />
asyn.IsCompleted gives always True and i'm not able to understand how the message is fully received. What i need to change in this logic?
Thank you
|
|
|
|
|
The TCP stack will not necessarily deliver a whole message like this. You have to be prepared to join message fragments together.
You also have to be prepared for multiple messages to be concatenated.
For more information, read the Winsock Programmer's FAQ[^].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi mike,
Thanks for giving me such a valuable information.
Vinu.netguy
|
|
|
|
|
hi,
in my system i have .NET 1.1 & .NET 2.0.i hosted a website also.so when i browse the site which version will invoke.
and that application is built on .net 1.1.
what could be the problems updating .net1.1 to .net 2.0.
thanks & regards
naveen.
|
|
|
|
|
If you go to your website properties under IIS, you see that with the installation of .NET 2.0 a new tab was added named: "ASP.NET". There you can select your .NET version.
Furthermore .NET 2.0 is fully compatible with 1.1 and 1.0, so .NET 1.1 code can be compiled and run without problems under .NET 2.0
Gidon
|
|
|
|
|
hi,
thanQ for reply gnjunge.
its showing as .net 1.1(read only).iam unable to edit the configuration.
And why its taking 1.1 as default instead of 2.0. even i updated to .net 2.0 from .net 1.1.
And one more thing is while browsing iam getting an error as "Server Error '/' in Application".And end of the page its displaying .net version as 1.1.
Thanks & Regards
Naveen.
|
|
|
|
|
Hi Naveen,
First of all, if you compile your project in VS 2003, it will use the .NET 1.1 runtime. You can also make it support the 1.0 runtime through your project properties in VS.NET.
"Modifying this property causes the project system to update the web.config file in your project by adding assembly binding (<bindingredirect> and <assemblyidentity>) tags in a <dependentassembly> section. Web pages in Visual Studio-built ASP.NET Web applications are precompiled to a .dll file with a dependency on the runtime associated with the compiler."
I guess setting that option in the ASP.NET tab, will compile the aspx pages on runtime to one supporting the 2.0 runtime (but not the pre compiled files, since that option was set in VS.NET)
So if you would compile your project in VS.NET 2005, it will use the .NET 2.0 runtime.
Gidon
|
|
|
|
|
How do I get the key code F5 of the DataGrid?
I use the following code:
FORM:
protected override bool ProcessDialogKey(Keys keyData)
{
switch (keyData)
{
case Keys.Control | Keys.F:
Seek();
break;
case Keys.F5:
break;
case Keys.Escape:
this.Close();
break;
case Keys.F1:
CallHelp();
break;
default:
break;
}
return base.ProcessDialogKey(keyData);
}
DATAGRID:
private void baseDataGrid_KeyPressed(object sender,System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.F5)
{
this.Cursor = Cursors.WaitCursor;
dsDataSet.Dispose();
dsDataSet = mBaseBuisness.GetAllRows();
m_dvCurrent.RowFilter = "";
baseDataGrid.DataSource = m_dvCurrent;
this.Cursor= Cursors.Arrow;
}
}
I get the key code of all keys, but not from the key F5.
Regards
Uwe
|
|
|
|
|
Can anyone tell the diffrence btn. Multithreading and APPDOMAIN, as i know Appdomain is "Application domain is a construct in the CLR that is the unit of isolation for an application." and Mutithreading is " the ability of an operating system to concurrently run programs that have been divided into subcomponents, or threads"
So whats the diff. btn. two and which to be used when?
Vipsi
|
|
|
|
|
A thread typically runs a portion of code. If you have more than one thread running (by default they run at the same time) your application is multi-threading. For example, if you were calculating the value for pi to 100,000,000 digits it would take a very long time. You would still want a user to interact with your app while it's calculating, and not "freeze" your app. In this scenario you would use a thread to do the asynchronous work of calculating the value of pi.
An application domain is really just a box to run things in. When you create a new thread it, but default, runs in the application domain of your main program. Now, lets say you have 3 threads running and you haven't created any applicaiton domains. If one thread crashes they will all crash. An application domain gives you the security of keeping everything running inside it from influencing other processes. You can create single or nultiple threads in an application domain. So, if you have 3 threads and each one is in a different application domain, if one thread crashes the other two will continue to run.
That's the basics of it. I'd go to MSDN for the details about how app domains work in terms of security, isolation etc..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconapplicationdomainsoverview.asp
|
|
|
|
|
Thanks. This clears my doubt regarding APPDOMAIN and multithreading.
|
|
|
|
|
Hi everybody,
I have a DataGrid in my form that bound to a DataSet, I use background thread to update the data in the dataset, bacause there are a few threads working behind, I don;t want the updated data to be displayed in the Grid until all the threads finish. I try to use SuspendBinding, but it doesn't work.
Does anybody have idea of how to solve it?
Thanks
Alan
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|