|
First you're hyjacking someone elses thread.
Second, noone is just oging to "give" you anything. We're here to HELP you write code, not just hand it over.
If you want a complete explanation of how a game works, start using Google. I'm not here to do your research for you.
Start with this[^]...
|
|
|
|
|
I have been receiving this exception for over a week with a .NET remoting app and can't find a solution anywhere that works. Below I'll paste my config files and the client code calling the remote method. I'd really appreciate some assistance. The Server code and files are on a remote server within our facility and have been told more than once there is no firewall between my workstation and it. So firewalls are out of the question as the source of the problem. I assume its somewhere in my config files but I've tried everything I've seen on the net.
I receive the Net.WebException: underlying connection was closed:unable to connect to remote server exception message.
Any thoughts?
------------------------------------------------------------------------------
client config:
<configuration>
<system.runtime.remoting>
<application>
<client url="http://agiledev2.sanmina- sci.com/DataExtractService">
<wellknown type="AgileExtractNegotiator.ITNSManager, AgileExtractNegotiator"
="" url="http://agiledev2.sanmina-sci.com:1234/DataExtractService/TNSManager.soap">
<wellknown type="AgileExtractNegotiator.IDataExtractManager, AgileExtractNegotiator"
="" url="http://agiledev2.sanmina-sci.com:1234/DataExtractService/DataExtractManager.soap">
<channels>
<channel ref="http">
// <customerrors mode="off">
------------------------------------------------------------------------------
server config:
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" port="1234">
<lifetime leasetimeout="20M"
="" renewoncalltime="20M" leasemanagerpolltime="3M">
<service>
<wellknown mode="SingleCall"
="" type="DataExtractServer.DataExtractManager, DataExtractServer" objecturi="DataExtractManager.soap">
<wellknown mode="SingleCall"
="" type="DataExtractServer.TNSManager, DataExtractServer" objecturi="TNSManager.soap">
<customerrors mode="Off">
------------------------------------------------------------------------------
client code:
Dim app As Windows.Forms.Application
Dim rc As RemotingConfiguration
Dim strConfigFile As String = app.StartupPath.Trim & "\DataExtractLogin.exe.config"
rc.Configure(strConfigFile.Trim)
rc.CustomErrorsEnabled(False)
Dim rh As RemotingHelper = New RemotingHelper
Dim tnsm As ITNSManager = CType(rh.GetObject(GetType(ITNSManager)), ITNSManager)
Dim props As IDictionary = ChannelServices.GetChannelSinkProperties(tnsm)
props("username") = "*********"
props("password") = "********"
Dim TNS As TNSGeneral = New TNSGeneral
Try
TNS = tnsm.GetTNSInfo
Catch rEx As RemotingException
MessageBox.Show("Remoting Exception: " & rEx.Message.Trim, _
"Remoting Service Error", MessageBoxButtons.OK, MessageBoxIcon.Stop, _
MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification)
Exit Sub
Catch argEx As ArgumentException
MessageBox.Show("Exception: " & argEx.Message.Trim & argEx.InnerException.Message)
Exit Sub
Catch aEx As ApplicationException
MessageBox.Show("Exception: " & aEx.Message.Trim & aEx.InnerException.Message)
Exit Sub
Catch nrEx As NullReferenceException
MessageBox.Show("Exception: " & nrEx.Message.Trim & nrEx.InnerException.Message)
Exit Sub
Catch nwEx As Net.WebException
MessageBox.Show("Net Web Exception: " & nwEx.Message.Trim)
Exit Sub
Catch Ex As Exception
MessageBox.Show("Exception: " & Ex.Message.Trim & Ex.InnerException.Message)
Exit Sub
End Try
-- modified at 12:49 Wednesday 1st February, 2006
|
|
|
|
|
I have a Winforms app written under .net1.1. After it is installed on a client, it will fail to launch until such time as someone with machine admin rights logs on to the client and runs the app once. Then it works for any other non-admin user that logs on and the failure cannot be reproduced even if we subsequently remove the app and the framework and reinstall everything from ground zero.
Current theories are (1) code access security problem or (2) problem accessing isolated storage for the very first time. I use a little bit of isolated storage for form / user settings and the like. We don't consider (1) likely because it's installed on the local machine (full trust zone) , and it operates fine for non-admins once an admin runs the program on the client once. I thought of (2) because this is the first .net app deployed to the clients, and we install .net 1.1 as part of the setup process, so it's likely that nothing has ever attempted to access isolated storage on the client prior to this program.
The error message displayed when the app is launched is cryptic. It’s not even a normal .net unhandled exception dialog that displays where it was at in the call stack or displays problems related to code access security. Just "an unhandled exception has occurred, process ID XXXX, Thread ID XXXX, Click OK to terminate or Cancel to debug."
I'd love any additional theories or suggestions.
Pat
Pat K.
|
|
|
|
|
Select "Debug" and find out what the exception stacktrace is. Finding out the Exception message, inner exception etc is critical in solving these types of issues.
|
|
|
|
|
That's the fun part, it says no debugger is installed... apparently installing one requires the visual studio install cd... so I'll have to bring those to work and repeat the process on yet another clean machine and install .net debugging components if I can figure out how to do that. I can't figure out how to replicate the problem on a given machine once I've run the app as machine admin so I'll have to scrounge for more machines.
It's very weird - every other unhandled exception situation I've ever seen displays the .net "unhandled exception" dialog with a "details" button that will list where it is in the call stack when it failed, and a "continue" button. This one just has OK and Cancel and absolutely no information other than the thread and process ID.
|
|
|
|
|
Aha.. ! two options:
a) modify the code so it records the exceptions to a textfile (make sure you're taking care of Unhandled exceptions, application exceptions, and thread exceptions.
b) you dont need VS installed on that machine to be able to debug. You can remotely attach a process. From the machine that does have VS installed, select "Debug Process" from the menu. Specify the name of the computer to which you want to connect. Select the process... etc. You will be able to debug the same way as if you had the program running on your machine if you copy the build PDBs to the application folder on your remote machine also.
- Malhar
|
|
|
|
|
regarding b)
I tried this yesterday (but without PDB's present). Added self to remote machine's debugger users group. Got an error about could not debug. I read what little I could find in MS documentation about remote debugging and it said you had to do all this crap (install remote debugging components on the target machine using the VS.Net setup CD) to be able to debug a process on a remote machine. Are you saying that if the PDB files are present on the remote machine then that process is not needed? If so, I'll give it a try. The 2 clients I initially tried this on were 2000 miles away, so I did not have physical access to go install stuff from a CD. The machine I had to play with today (locally) I wrecked - i.e. accidentally forgot I was logged on as admin and launched the failing app, so that it began working for non-admin, before I got any further. Thanks for the tip, I'll see if I can stick PDB files somewhere and get some info.
|
|
|
|
|
RegistryKey.OpenSubkey method failed when attempting to wrie the first ever EventLog entry for my application. Seems I need to look into having the EventLogInstaller class do something as part of my setup package.
|
|
|
|
|
If you're creating a custom EventLog, not using the standard Application or System logs, this requires admin rights to create the new log. After that, anyone user account can write to it.
You're correct. You'll have to add a custom action to your Installer to create the new event log. Admin rights shouldn't be a concern considering you normally need admin rights to install an app anyway.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi,
Is there any way of using a web proxy (i.e. using the WebProxy class in .NET) to send e-mails through as part of an e-mail client, without changing IE Settings?
The key is that I need to be able to mask IP addresses in e-mail headers sent from my e-mail client via an SMTP server, like GMail. The headers for GMail have the IP address in them if you don't send them from thei webmail cliet, you see...
Any and all help appreciated!
|
|
|
|
|
hi,
this question look silly but i need it.
i am extracting values from a pdf file and am assinging those values to a string array of fixed length. if i get extracted value as empty ( empty string) i have to assign that particular value as NULL . (becoz i have to insert this value into the database) using null option in the vb is not working. can any body help me ....
raj
-- modified at 5:27 Wednesday 1st February, 2006
|
|
|
|
|
Use DbNull.Value.
---
b { font-weight: normal; }
|
|
|
|
|
thanx for giving reply..
but dbNull inserting empty value into the database(sql server) . but i want it as "NULL" value.. ( i mean i want "NULL" word insted of empty )
raj
-- modified at 7:28 Wednesday 1st February, 2006
|
|
|
|
|
Make sure the table column is define as allowing nulls and doesn't have a default value specified.
|
|
|
|
|
hi,
i am sure the table column is define as allowing nulls ...
thank you
raj
|
|
|
|
|
I have tested both techniques and the database has the <null> value:
SqlCommand Lcomm;
DataSet Lds;
SqlDataAdapter Lda;
SqlCommandBuilder Lcb;
string LstrQueryString;
LstrQueryString = "Insert into Table1 (id, name) values (1, NULL)";
using (SqlConnection Lconn = new SqlConnection(@"Data Source=.\DA;Database=Testing;Integrated Security=SSPI"))
{
Lconn.Open();
Lcomm = new SqlCommand(LstrQueryString, Lconn);
Lcomm.ExecuteNonQuery();
LstrQueryString = "Select TOP 0 * From Table1";
Lds = new DataSet();
Lda = new SqlDataAdapter(LstrQueryString, Lconn);
Lcb = new SqlCommandBuilder(Lda);
Lda.Fill(Lds);
Lds.Tables[0].Rows.Add(2, System.DBNull.Value);
Lda.Update(Lds);
}
|
|
|
|
|
thanx for reply ...
But sir , u r inserting values threw query. but my values are in an external array. Like
str(0)="1234"
str(1)="$"
str(2)"asdf"
str(3)="qwer"
now i have to insert this values into the data base.
before inserting i am checking the string array for symbol "$".
but my question is if i get "$" i have to push that value as
NULL to the databse.
i tried for dbNUll but it inserting value as empty space NOT NULL.
like
LOOP:
if str(i)="$" then
str(i)= DbNULL
end if
END LOOP
"Insert into Table1 (name1,name2,name3,name4) values ('"& str(0) &"','"& str
(1) &"','"& str(2) &"','"& str(3) &"',)";
raj
|
|
|
|
|
Ooooh, now I understand what you are doing.
I believe you will have change you logic a little. The DBNull is only a database value. I believe if you change the code to the following this should solve you problem.
DataSet Lds;
SqlDataAdapter Lda;
SqlCommandBuilder Lcb;
object[] LaobjValues;
string LstrQueryString;
using (SqlConnection Lconn = new SqlConnection(@"Data Source=.\DA;Database=Testing;Integrated Security=SSPI"))
{
Lconn.Open();
LaobjValues = new object[2];
LaobjValues[0] = "5";
LaobjValues[1] = DBNull.Value;
LstrQueryString = "Select TOP 0 * From Table1";
Lds = new DataSet();
Lda = new SqlDataAdapter(LstrQueryString, Lconn);
Lcb = new SqlCommandBuilder(Lda);
Lda.Fill(Lds);
Lds.Tables[0].Rows.Add(LaobjValues[0], LaobjValues[1]);
Lda.Update(Lds);
}
|
|
|
|
|
thax for reply.
i done like what u have said. but now it is giving
error as object required. (rutime error '424')
thanx
raj
|
|
|
|
|
I'm looking for a grid in Windows.Form to display some data stored in RAM (arrays, collection, ...) and not in a database.
Reading the DataGrid documentation seems that it display only data stored in a database or in a XML file.
Is there a grid to do this ?
I'm using C# in Visual Studio 2003 and Framework 1.1.
nikolag
|
|
|
|
|
You can bind the DataGrid to various differnt sources including arrays/collections/etc.
You can also use ListView to display items in a grid. Use myListView.Items.Add(new ListViewItem(new string[] {"Value1","Value2"}));
Make sure you've added appropriate columns to the list view. Checkout the "Columns" property.
- Malhar
|
|
|
|
|
ok, the Microsoft documentation is not clear on this point .
Thank you for your help .
nikolag
"Tutti sanno che una cosa è impossibile da realizzare, finchè non arriva uno sprovveduto che non lo sa e la inventa"
(Albert Einstein)
|
|
|
|
|
I am looking for a short overview explanation of 1.1 vs 2.9 .NET differences. I realize there is the What's New in the .NET Framework Version 2.0 http://msdn2.microsoft.com/t357fb32.aspx[^]
But.... is there something a bit shorter that gives the major differences? I was thinking I could take the "What's New in the .NET Framework Version 2.0" and try to shorten it up. But maybe there is something out there already that gives a very quick summary? I am really looking for something that will allow me to still use old .NET framework documentation (hard-copy books ), and then have something to refer to to make sure any older documentation that I am reading is not too out-of-date.
|
|
|
|
|
LuluSailor wrote: I am looking for a short overview explanation of 1.1 vs 2.9 .NET differences. I realize there is the What's New in the .NET Framework Version 2.0 http://msdn2.microsoft.com/t357fb32.aspx[^]
That IS the summary version. There are over 200 new classes, 2,000 new methods, and some 1,200 changes to existing methods and properties. There's just no way you're going to be able to just "refer to the things that changed documentation" because the changes are in every corner of the Framework. I think your best shot is to just refer to the documentation for classes that you would be using and seeing what's changed and what's new.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|