|
I am trying to configure my firewall to allow access to my .NET remoting application. I set my firewall to route tcp traffic on a particular port to my internal PC. This works fine for instance if I run a web server on my machine (port 80) but I cannot get my .NET remoting server exposed. My port scanner says the correct port is open. I am simply opening up port n to TCP traffic. ANy suggestions?
Joel
|
|
|
|
|
|
Your link didn't seem to point to a relevant thread. My server is a simple server with no call backs to the client. I thought that if you configure the server to listen on one port that would be all it needed. If it needs more ports, how do I know which ones.
Thanks - Joel
|
|
|
|
|
Just to see what happening (if anything similar to this) try opening up a command window on the server and run netstat to show you a listing of all the TCP connections.
Hit your service and then see if there are any connection attempts outwards on another port.
|
|
|
|
|
I found the problem and it has nothing to do with open ports. When using CAO in remoting, the server sends the IP of the server back to the client which it then uses to get back to the server. When using a firewall, the IP sent to the client will often be the internal IP which is not the IP that the client can use to get back to the server. So you have to override this in the config file for the server with something like:
<channel ref="tcp" port="5555" machinename="firewall.something.com">
Joel
|
|
|
|
|
I need to add an Outlook toolbar to a .NET form? Does .NET come with such a feature? If not is there a free way to do this or must a component be purchased? If a componentmust be purchased does anyone recommend one for C++ .NET forms?
Many Thanks,
Derek
|
|
|
|
|
Take a look at this project
http://www.codeproject.com/cs/miscctrl/outlookbar.asp
|
|
|
|
|
Has anyone else had problems trying to attach on to a web service while your IE proxy setting sare set up for auto-discovery and to use a configuration script?
It seem sthat I have to set my proxy settings for an explicit proxy server address in order to use any webservice.
|
|
|
|
|
|
Yeah, leppie was wondering about that type of stuff so I posted it in the C# forum...probably should have said it here too...
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
I just had a thought as I was drifting off to sleep and can't seem to come to a conclusion why it would work out, but I also can't seen to decide just how it COULD work. Let me explain.
When developing a windows forms application that gathers some information by accessing a web service, you have to first start by creating a web reference in the solution. That much I understand.. Here is where my mind goes crazy...
What happens if I deploy the web service on a machine that is named differently than my development box? Does the application somehow find the new location of the webservice? I doubt that...
I have a feeling that, just like using the fancy database wizards to create connections to a SQL database, I have stubled upon a major 'flaw/feature' of the VS.NET IDE. It seems like ALL of these things require that you develop on the same machines, or at very least machines with the same names, that will be used in production.
Am I nuts or just missing some big picture here?
|
|
|
|
|
Ray Cassick wrote:
Am I nuts or just missing some big picture here?
Ray Cassick wrote:
I just had a thought as I was drifting off to sleep
It is the Drifting Off To Sleep Thoughts Demon at worka gain
If you think about it this kind of problem has existed since before web services, before the internet etc. With a client/server database setup you would always have problems if the server location changes.
And just as with the connection wizard for SQL you can go into the generated code and change the location or rather assign it to an app setting.
So I would not call it a "major flaw", just one of the "wizard tradeoffs" really.
Won't it be nice though one day when we can use a proper URL for our in-dev web service and then just flick a switch once it is ready for prime time? No uploading, configuring, changing app settings and all that other crap which drives me up the wall.
|
|
|
|
|
Paul Watson wrote:
It is the Drifting Off To Sleep Thoughts Demon at worka gain
Yeah, hate it when that happens... The one night I decide to get to bed early too...
Paul Watson wrote:
Won't it be nice though one day when we can use a proper URL for our in-dev web service and then just flick a switch once it is ready for prime time?
Well they should at least allow us to use a DSN for the database stuff. Why they don't allow the wizzards to reference a DSN is way beyond me... would solve that problem right there.
Hmm that's not a bad idea.. DSN for a webservice... I wonder if I could set up a local DNS entry that points to the web service directly...
|
|
|
|
|
Ok, I have a link here that fixes what seem to be ALL my issues regarding development configuration vs. deployed configuration...
Clickety[^]
It outlines propper use of the application.config and user.config files...
Great stuff, but should be MUCH simpler to find IMHO.
Hope it helps someone in the future.
|
|
|
|
|
Hi Code Gurus,
(in a C# Windows Form application) How can I detect that the Enter key was pressed in a single line TextBox control in .NET? I want to enable the user to type in some text in the TextBox (a command) then by pressing Enter an action is taken (like the address bar in IE). This can be done very easily in VB and VC++. But in .NET, the only way I discovered so far is to use a multi-line textbox control and detect when the user presses Enter (using either KeyDown or KeyPress events) then remove the new line characters from the text, this is other than deleting any multine text pasted in the control except the first line. I believe there must be a better and more elegant way to do this but I just don't know it!
Regards,
Waleed
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
If you're going to ask this in one forum, please don't ask it in another. Cross posting is really frowned upon here. Just FYI before someone else who's in a really bad mood decides to jump down your throat...
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Hi Code Gurus,
(in a C# Windows Form application) How can I access a public member of the form that defines the static Main() member function from another form? I have two forms, frmMain (defind in frmamin.cs) and frmDialog (defined in frmDialog.cs), I want to access a member of frmMain (a property or a function or whatever member) from within frmDialog. When the application runs, the frmMain form is displayed as the application's main window, if the user chooses Connect... from the application's menu, the other form frmDialog is displayed as a dialog using ShowDialog(), now what I want is to access some member fields of frmMain from within frmDialog while frmDialog is displayed as a dialog box (that was extremely easy in VB).
Well, to be more specific, what I want to do exactly is to enable the user to connect to a database, when the user selects Connect... from the menu, a dialog box is displayed to allow the user to enter the database connection information. There is an OleDBConnection object (public member), defined in frmMain, that I want to use in frmDialog (there is a button in frmDialog whose caption is "Connect"). In the event handler of that button I want to use the public member of frmMain (System.Data.OleDB.OleDBConnection m_OleDBConn). For example like this:
myfrmMain.m_OleDBConn.ConnectionString = ... etc
Regards,
Waleed
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
This is an extremely common question for people migrating from "classic" VB to .NET, as a result of the confusion caused by the way VB doesn't differentiate between the form class and an instance of the form.
The simple answer is that you have to provide a reference to the instance of your frmMain to the instance of frmDialog:
class frmMain : System.Windows.Forms.Form
{
public System.Data.OleDb.OleDbConnection m_OleDBConn;
...
private void Connect()
{
frmDialog D = new frmDialog();
D.Parent = this;
D.Show();
}
}
...
class frmDialog : System.Windows.Forms.Form
{
...
public frmMain Parent;
public void OK_Click(object sender, EventArgs e)
{
Parent.m_OleDbConn.ConnectionString = ... etc;
}
}
A better approach would be to show frmDialog as a dialog, and use public properties on frmDialog to retrieve the information in frmMain. For example:
class frmMain : System.Windows.Forms.Form
{
private System.Data.OleDb.OleDbConnection m_OleDBConn;
...
private void Connect()
{
frmDialog D = new frmDialog();
if (D.ShowDialog() == DialogResult.OK)
{
this.m_OleDBConn.ConnectionString = D.ConnectionString;
}
}
}
...
class frmDialog : System.Windows.Forms.Form
{
...
public string ConnectionString
{
get
{
return this.txtConnection.Text;
}
}
}
|
|
|
|
|
Hello,
I need some refernce points on accessing Assembly resources.
what I need is to add an xml file to a project, compile it into the exe and later access it without loading a file.
any help would be great.
Noam
Noam Ben Haim
Web Developer
Intel
noam.ben.chaim@intel.com
|
|
|
|
|
Are there any good ASP.NET applications/books/sites out there that show good 'best practices'.
I am currently working on an ASP.NET application and I have created lots of web controls and functionality. However the one thing I can't get my head round is how to actually structure all the pages to create a good Web Application.
What I currently have is functional but it is not pretty.
Thanks for your input.
Stupidity dies.
The end of future offspring.
Evolution wins.
- A Darwin Awards Haiku
|
|
|
|
|
|
I haven't finished looking through the documents yet but the IBuySpy.com site has ASP.NET best practices sample apps for a store front and portal site. Examples are available in both VB.NET and C#. So far it looks good although i'm no expert.
|
|
|
|
|
Yeah I did look at those myself but I can't make up my mind as to the suitability
Stupidity dies.
The end of future offspring.
Evolution wins.
- A Darwin Awards Haiku
|
|
|
|
|
For a psuedo-serialization method I'm doing to persist a tree view (the reason it's psuedo is because I don't want the TreeNodeCollection serialized as an element), I have two method signatures like so:
public void LoadNodes(XmlNode xmlRoot, ref TreeNode treeRoot);
public void SaveNodes(TreeNode treeRoot, ref XmlNode xmlRoot);
What I'd like to do, since this could be a fairly lengthy operation and needs to be done on 4 separate trees, is provide our framework application with Begin* and End* functions for asynchronous processing.
I've worked with threading a lot and have used asynchronous methods many times in the past, but I'm having problems imlementing it myself. I've written basic asynchronous methods were the state object is enough to pass custom values. I've read about all I can on it, and all the examples reference methods of the MulticastDelegate class that don't exist (I'm guessing these were .NET pre-release articles). I've also considered just returning Control.BeginInvoke and getting the object from Control.EndInvoke, but neither of my methods above return anything (hence, void - and there's a good reason for it).
Has anyone written any asynchronous methods that could help me? TIA
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
Okay, after reading an article in the docs one last time, I caught something I obviously missed last time. If you use the correct method signature, the compiler will generate BeginInvoke and EndInvoke automatically. It wasn't showing up in the Intellisense menu - nor the class documentation - so I never noticed it before.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|