|
Hi everyone ,
Which of the following approach is more suggestible - nested if or a do - while with break statement , while performing large number of validations
|
|
|
|
|
these two suggestions are usually for totally different situations.. a nested if has no repetition, unlike a do/while loop.. using a do/while loop just for validation (with no need for repetition) seems like a bad idea..
provide some more details as to what your looking for.. also, have you considered case statements?
|
|
|
|
|
Hello,
I am running a Web Application on C#.
I have a site with a dedicated IP address - say xx.xx.xxx.xx
Now the application running on the server is made to fetch a URL request - from a site which will accept Hosts originating from specific IP addresses only.
What is happening is whenever the request is being made - the server is picking up one of the many IP addresses available in its pool to fetch the request and thus not validating and getting a Host Authorization Failure.
Is their any setting which I can make in Web.config or anything which I could do so that I can bind my dedicated IP to be the outgoing server request IP address !!!
PLEASE HELP !!!
Regards,
Ani
|
|
|
|
|
Please don't cross post.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Cross Post as in ??? ...
Any suggestions or solution !!! ....
|
|
|
|
|
Posting the same question in multiple forums. Most of the people here who answer questions regularly visit all the forums, not just one or two.
Also, posting in multiple forums makes it very difficult for multiple people to collaborate on an answer.
|
|
|
|
|
You asked the same question in the Vista forum. Pick the appropriate forum instead of posting the same message throughout several others.
"Try asking what you want to know, rather than asking a question whose answer you know." - Christian Graus
|
|
|
|
|
KEWL ...
THANX - HAVE DELETED MY POST FROM VISTA FORUM !!!
BY THE WAY ANY SOLUTIONS / SUGGESTIONS FROM ANYONE !!!
|
|
|
|
|
Using .Net 2.0...
I'm using System.Diagnostics, but there is not "Process" item according to intellisense. Did MS move it to another assembly?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Did MS move it to another assembly?
No, they didn't. Either add using System.Diagnostics; to the usings and then you will have access to Process class in your source code file or just write the full name when you need to access process class
System.Diagnostics.Process pr=new System.Diagnostics.Process();
|
|
|
|
|
I've tried it both ways. I even went ot see if I needed to add a reference to system.diagnostics, and the assembly isn't referenceable that way.
So, now what?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Something must be broken because it's there.
|
|
|
|
|
led mike wrote: Something must be broken because it's there.
Saying that a Microsoft product is broken is like looking at a flat tire and saying there's no air in it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Could it be that I can't run an external app from a web app?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
You can, but it will run on the server and that's probably not what you're trying to achieve.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
John Simmons / outlaw programmer wrote: Could it be that I can't run an external app from a web app?
Well if it is running you better come get it because it just ran past my window
|
|
|
|
|
Intellisense doesn't always work as expected. Try the following:
1. Recompile your code (this may work, but most likely not).
2. Close the tab (file) and reopen it. This should cause intellisense to look at the file again.
3. Restart the IDE.
Beyound those three, you will have to delete all intermediate files including *.suo files. Then it should work again.
The problem that I see here is that intellisense is not working as expected.
Phil
|
|
|
|
|
This whole thing started out as a conversion from PHP to C#. I started out by adding a new class to an existing web site project at home (because it seemed to be the right thing to do). I then emailed it to myself at work, and added the class to a winforms app. Well, it still had all the using web*.* lines in it, so I got to thinkin...
I created a new web site and added this class to the site, and bingo! Intellisense is showing me what I want/expect.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I bet you didn't have a reference to System.dll in your older projects while your new projetcs automatically got it.
Robert
|
|
|
|
|
Well, you're wrong. All classes created in VS2005 with the templates automatically have using System; in the cs file.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I didn't mean the using System . What I mean is the reference to the System.dll of your project. It might have not been added in the conversion. Removing it from the references of a newly created project reproduces your described behaviour: The System.Diagnostics namespace is there... but no Process class.
Robert
|
|
|
|
|
How does one person searches strings for characters disregarding special characters?
For example, in portuguese we have the word "Àgua" and i need to do 2 things:
- Arrange a list of those strings that start with "a", "b", etc, where "à" and "À" should both be considered as "a".
- Do some kind of search with the same consideration, that is, someone searching for "agua" should also find "Àgua".
Anyone knows?
Windows is just as secure as Linux. When shielded with a Firewall, Anti-Virus, Anti-Spyware and disconnected from the Internet.
|
|
|
|
|
Have you resolved this?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
No... Haven't found any solution that is even close.
Windows is just as secure as Linux. When shielded with a Firewall, Anti-Virus, Anti-Spyware and disconnected from the Internet.
Windows has even better performance that Linux. When running without Firewall, Anti-Virus and Anti-Spywayre.
|
|
|
|
|
Yes it looks much better with PRE tags; why did you use CODE tags in the other forum?
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|