Before I was getting an error about having a colon in the request with no port specified. Now, I get this error from IE in a dialog box entitled Address Bar.
Windows cannot find
'https://email@example.com:Password@www2.swift.com/bicdownload/bicdownloader?action=getfile&productline=bicdir&product=bicdb&content=full&format=txt&platform=win'. Check spelling and try again.
I don't know how to escape an @ in your username. I just tried putting the uri without username:password into ie8 and a dialog popped up asking for credentials. Could you try this, enter your credentials and see if you get the file?
If you do, it means your account and local network are working, which would narrow the problem down to the credentials your proxy is passing when you use WebRequest.
Be excellent to each other
Sounds like your idea of the proxy server interfering is a winner. I'm talking over my head here but I'll do my best to explain what I just learned. I spoke with two of our architects who said that any https requests have to spoof a validated certificate because our infosec dept strips out the remote host's certificate and inserts one of their own. I have some sample code that one of them uses for a web service that makes https requests. Because it's a web service the code is slightly different but it's the same idea...
By "faking" the true value for the ValidateRemoteCertificate method the authentication succeeds and the connection will open successfully. I'm off to work this into my routine. If/when I get it working I'll post the "correct" code. Thanks for helping me work through this!
Thought that the certificate was going to be the silver bullet but I still get my now least favorite response: The server returned an error: (401) Unauthorized. I'm headed back to the drawing board. Not defeated yet, but getting there.
In the above example how would you modify the button's location in C#
for (int i = 0; i < 20; i++)
Button buttonName = new Button();
buttonName.Location.X = i * 20;
When I try this I get an error message
Cannot modify the return value of 'System.Windows.Forms.Control.Location' because it is not a variable
I think I should have created an array of button pointers, but I can't remember how.
if you know how to do things in Visual Designer (say position a button), then you can watch the code it generates (for a form myForm that would be in the InitializeComponents method inside file myForm.designer.cs).
So there is no magic involved, you can try and put similar code where ever you want, be it in the Form's constructor, load handler, a button click handler, you choose.
Apart from that, it helps to look up things in the documentation (use google to locate stuff) and to interpret compiler messages to the letter.
Luc Pattyn [Forum Guidelines][My Articles] The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
I'm editing an existing library of user controls and I must admit, my experience is limited. These user controls are a combination of other user controls, mainly buttons and and panels. They where created to mimic the companies existing controls used in webapps for our desktop applications. Simple, and it works but they where initially designed for limited scalability.
So now the requirement emerges that each control should be resizable without altering the relative position of controls, some of which are transparent. I'm implementing this by, what appeared to be the easy task of reordering controls in the document outline and editing each controls dock and padding properties, which worked fine for a couple of controls.
Now I have the following outline: (control names reduced to simplicity to avoid confusion)
I dock Panel1 to DockStyle.Fill to the Parent UserControl to ensure that the control is resizable for obvious reasons, My problem is Panel2, which is overlayed on Panel1 by 6 pixels from the left and right respectively, I wish to keep this same fixed distance from the parent despite resizing, so I set dock to Fill and padding for left and right to 6 each, figuring this would work. It doesn't, which makes me feel I misunderstand the usage of Padding to begin with.
Any suggestions on where I went wrong and what would be the proper usage to enable this resizable implementation work as intended?
If you look into the anchor property instead of dock. that will do what you want and keep the 'indent'. Problem with the anchor is it may not work how you want it to if you have a lot of controls in the same control. i.e. 3 panels that need to have a 3rd of the form space each can not be handled with either dock nor anchor - that would need to be done manually on a resize event.
Life goes very fast. Tomorrow, today is already yesterday.
I'm lookin for a design-pattern that match what I need: I have class A which should hold a collection of class B or its inehrited classes. class B should be able to run functions and access properties on A and A should be able to run functions and access properties on B.
I've been suggested to pass reference of As properties to B opon construction, but I'm lookin for the design-pattern...
anyone know of any design-pattern similar to this?