|
make your form object serilizable to save it
Amr Abdel-Mohsen Hafez
Software engineer
Cairo
E g y p t
|
|
|
|
|
I want to save the form with its current data and open it directly whenever i
want Just like exe
Regards
Sakthi
|
|
|
|
|
Hi,
I would like to know how to call the webservice (SOAP\HTTPS) over https connections in c#, please point me to the article.I'm finding articles for http but not for https.
Thank you
Mohan
|
|
|
|
|
You set up the https in the properties of the web service. If you go into iis manager find your web service right click properties. On the web site tab you set the ssl port to 443. You need to have a certificate for ssl to work. Then your address to your web service will be https:
Hope that helps.
Ben
|
|
|
|
|
Dear All,
Please let me know how can I implement Windows Authentication for a windows application using c# ?
Thanx & Regards
|
|
|
|
|
Mr Perfect wrote: Please let me know how can I implement Windows Authentication for a windows application using c# ?
Well, it should already be running in the context of the user that launched it. So you just need to get hold of the current Identity:
using System.Security.Principal;
...
WindowsIdentity wi = WindowsIdentity.GetCurrent();
From there you can get hold of various information that you would likely find useful.
|
|
|
|
|
If there was something wrong with the answer I gave, please let me know. Don't vote me down indiscriminately.
|
|
|
|
|
Hi.
I have a string representing the contents of an xml file with utf-16 encoding and i want to change it to utf-8. I want to replace the whole header of the xml to be sure that only one occurrence will be found within the string by the Replace() method of the string class.
So all I want is this:
<?xml version="1.0" encoding="utf-8"?>
instead of this:
<?xml version="1.0" encoding="utf-16"?>
How do I deal with the double quotes that appear in the string?
How should I write the arguments of the Replace() method in this case?
Thanks.
|
|
|
|
|
If I am correct, i was struggling with the same problem yesterday.
Before the " char, you have to place a \ char so that the compiler does not see it as a string type.
Marquin
|
|
|
|
|
I found the answer:
<code>Replace("<?xml version=\"1.0\" encoding=\"utf-16\"?>", "<?xml version=\"1.0\"encoding=\"utf-8\"?>")</code>
|
|
|
|
|
|
Hi, I used one excellent article from Code Project to build a TCP server in C# (.Net 2.0) with System.Net.Sockets and it's working great. I only have a minor issue:
The server is reasonably fast to provide answers, the round trip is usually less than 50ms. But some clients split their requests in 2 packets and the server has to wait for the last packet before it can provide an answer. In those situations the round trip time becomes close to 200ms because the server ACK to the first packet is delayed around 150ms. The only way I've found to go around this is to let the server reply to the first packet with a single space character: the client ignores it and the delay is minimal when the server has something to reply.
I tried to set NoDelay = true on the socket but it has no effect on this problem. Are there any other options I am missing?
Thanks!
|
|
|
|
|
How do you separate a string into two strings?
string s = "hello:you";
sting left;
string right;
for example the string above should return:
left = "hello";
right = "you";
Please note that the left and right strings of the separator i.e. : can vary
Thanks
|
|
|
|
|
string[] stringarray = s.Split(':');
|
|
|
|
|
i want to Open Folder Option,My Network Places, Map Network Drive, Disconnect Network Drive, Search Files and Folder.
i use following code :
System.Diagnostics.Process.Start("explorer.exe", "My Network Place");
but not Works?
Sanjit.rajbanshi@wlinktech.com
|
|
|
|
|
hey...
I am working on an application that used the complete form for drawing(using openGL) but the problem is that after I add menus to my application the menus are not displayed at run-time....
kindly tell how to solve this problem??
someone also suggeted to use of panel how to setup panel for drawing in C#?/
thanks
|
|
|
|
|
You probably would find it easier to use DirectX. If you must use OpenGL, then I'd use C++, you're not going to be doing much directly in C#, I would expect.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If your using forms to display then the OGL takes over all drawing so you cant use the default drawing UI components.
You'll have to create your own GUI components in OGL - i've done this in DirectX, and there are some good tutorials out there (CUnit for Directx is a good overview)
Its been a long time since i used OGL, but to write to the panel instead of a form i think its just passing the Win32 draw parameter fo the panel instead of the form when you start OGL (it really was a long time ago)
HTH
|
|
|
|
|
Hi All,
i am new to this forum...
i am developing a simple Voice\Video Chat application in C# using TcpListener and TcpClient classes...
Evrything works fine(Control Message passing and communication) but when any of the client disconnects,
CPU usage on the machine which runs the server reaches to 99%...which never falls after taht..
and server application crashes after some time...
Anybody faced similar problem here...
i am closing client and streams after use.....but of no use...
i am unable to figure out the problem area....
please guied....
waiting for reply...
atul hirve
|
|
|
|
|
atulah wrote: but when any of the client disconnects,
CPU usage on the machine which runs the server reaches to 99%...which never falls after taht..
and server application crashes after some time...
It seems that the thread which is assigned for the particular client is still running on the server machine and trying to get communicated with the client,. This is making the processor utilization high. One solution could be sending one quit message to server when client is going to close. When server gets the message, release the threads and all other resources allocated for this client. I think this will solve problem.
|
|
|
|
|
thanks man....
i will try it..and let u know what happens....
atul hirve
|
|
|
|
|
-I have made an application in c#.net,window application.
-Now to install it on other computers, i want to make its setup.
-I have already made setup of the application using d below link :
http://www.codersource.net/csharp_installer_projects.html[^]
- I have made my database in sqlserver2000,
-I have copied its 2 (database file and log file) from its actual path (C:\Program Files\Microsoft SQL Server\MSSQL\Data) and pasted it in my dotnet application folder.
-While making setup of application i just included those 2 database files with the application(from >bin>debug) of project (as instructed in above link)
Setup is build without errors, but when i run i get errors,they r related to sqlserver.
-Do i need to make database setup separately?How?
I would be grateful,if any help is offered.
Thank you.
Regards nekshan.
|
|
|
|
|
the only error facing by all users is of .net framework. if the target machine doesn't have .net framework then not able to run setup. check this is facing error.
or
my friend is on lunch once he came then i ask him & then replay u the exact error which u faced.
bye.
|
|
|
|
|
I created setup(as instructed in that link) just included 1 application of my proj(from >bin>debug)and my 2 sqlserver (database files) in the application setup(as instructed in that given link).
(In that link they used access,i have used sqlserver.)
It is build successfully, but
M getting this error after running the created setup (application):
System.InvalidOperationException: The ConnectionString property has not been initialized.
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at WindowsApplication1.login.login1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
plz chk n tell
thanks.
wen r u coming??
tc cu soon.
|
|
|
|
|
You said you're using SQL Server, and copied the database files on the client machine, but is SQL Server actually installed on that machine? If not, you're out of luck.
You will either have to install SQL Server on the machine where you install the database files, or you will have to go for some other data source, like MS Access.
Cheers,
Vikram.
"But nowadays, it means nothing. Features are never frozen, development keeps happening, bugs never get fixed, and documentation is something you might find on wikipedia."
- Marc Clifton on betas. Join the CP group at NationStates. Password: byalmightybob
|
|
|
|