|
hi,
i'm trying to develop an application wich must be able to view some web
pages, that need authentification, they are in a https server and i need to
send the username and password; but i've no idea how to do it.
Can someone help me?
If you don't know about c#, it'll be usefull for me knowing how this
protocol works.
Thanks
|
|
|
|
|
|
Hi,
i'm asking how to do authentification with a desktop app, and then recovery content for the user previously authentificated.
thanks
|
|
|
|
|
Previously Gurrio wrote:
i'm trying to develop an application wich must be able to view some web
pages, that need authentification, they are in a https server and i need to
send the username and password;
Gurrio wrote:
i'm asking how to do authentification with a desktop app
Okay, so where do the web pages and HTTPS come from? Are you putting a web browser control inside your desktop application? If so, does the web application exist already? And, how does the the web application deal with authentication?
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
The web application already exist. Is needed to fill in a form with the username and pass. this data is passed to another page which validates the user, and then you can brownse the site.
in my app i will use a html renderer, no a fuull web brownser.
the page i get, i'll modify and then show the modified one in my app.
|
|
|
|
|
HTTPS is handled transparently by the .NET Framework, both on the client and server side. Unless you're designing your own socket protocol and want to support SSL handshaking, you don't need to worry about it.
All you need to do is either send a GET request (any web application that sends your username and password in a query string is fraught with secure holes and should not be used; SSL cannot encrypt your Address bar so any user could see your credentials if they browsed your history) or a POST request.
This is quite simple using the HttpWebRequest and HttpWebResponse . In fact, if you read the documentation[^] for the HttpWebRequest.GetRequestStream method there is a nice example of how to send a POST request to the HTTP server.
Again, the SSL handshaking, encryption, and decryption is all handled for you automatically so don't worry about that, except to make sure that you're not sending credentials over unencrypted channels unless you don't have a choice (and only then make sure it's trivial enough that you don't mind getting 0wned).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
|
hi, i have explored parts of C#,ASP.NET.. but till now still confuse the right step to kearn .NET, i believe in .NET we have something like J2EE, JSP(ASP.NET in .NET), RMI(.NET remoting??), EJB(what in .NET?), i'm curious to know about that, can anyone help?
any difference between .NET and .NET enterprise?
|
|
|
|
|
You really should try searching, as there's countless articles and discussous already about this topic. Here's a search link with many results: http://search.msn.com/results.aspx?q=differences+between+J2EE+and+.NET[^].
The key is finding non-bias resources of which this C# forum is not typically one. I myself have done a heck of a lot of both J2EE and .NET development and greatly prefer the latter (and not just because I work for Microsoft).
EJB, BTW, is analogous to components in .NET. In fact, .NET is a component-oriented framework in and of itself. With Visual Studio .NET and other designers (like #develop), you can easily drag and drop components not only to build Windows Forms applications, but ASP.NET applications as well. The latter is equivalent to EJB in some respects, but a little deeper explanation that you can find by searching is necessary to see the picture more clearly.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
<table>
<tr>
<td valign="top"><asp:label id="lblName" Font-Size="12px" Font-Names="Verdana" Runat="server">Name</asp:label>
</td>
<td>
<asp:textbox id="txtNaamGebruiker" Font-Size="12px" Font-Names="Verdana" Runat="server" Width="245"></asp:textbox>
</td>
</tr>
<tr>
<td valign="top"><asp:label id="lblEmail" Font-Size="12px" Font-Names="Verdana" Runat="server">E-mail</asp:label</td>
<td><asp:textbox id="txtEmailGebruiker" Runat="server" Font-Size="12px" Font-Names="Verdana" Width="245"></asp:textbox>
<asp:RequiredFieldValidator ID="ChkEmail" Runat="server" ControlToValidate="txtEmailGebruiker" Display="Dynamic" ErrorMessage="Please Enter Email"></asp:RequiredFieldValidator>
<asp:regularexpressionvalidator id="Regularexpressionvalidator1" runat="server" ControlToValidate="txtEmailGebruiker" ErrorMessage="InCorrect Email Address." display="dynamic" ValidationExpression="^[\w\.\-_]+@([\w\.\-_]+\.)+[A-Za-z]{2,4}$"></asp:regularexpressionvalidator></td>
</tr>
<tr>
<td> </td>
<td><input id="Submit1" style="WIDTH: 185px; HEIGHT: 24px" type="submit" value="OK" name="submit" runat="server"></td>
</tr>
</table>
This is my code.
In this, i can make changes in RequiredFieldValidator's or regularexpressionvalidator's error messages. That is, the error message changed as editable format at runtime.
I don't know how to solve this problem.
please help, this important to me
|
|
|
|
|
The error messages are exposed as properties, and any server side code can modify them. See: RequiredFieldValidator.ErrorMessage[^]
So, in your code behind you can change the value of the error message before the page is rendered to the clint.
e.g.
myRequiredFieldValidator.ErrorMessage = "A different error message";
Does this help?
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
thank u for ur idea Colin Angus Mackay,
but this also produce the same error.ie., i can edit that error message
help me
|
|
|
|
|
a jpg picture object inserted into crystal report through Right-Clicked -> Insert -> Picture...
now, the picture inserted must be change to the file of c:\myPic.jpg or others by code dymanically.
How to do it?
thanks.
|
|
|
|
|
Hi! Dear,
I need to compare two files' content in my multithread C# code project.So,which class and what method should I use?
Thanks!
momer
|
|
|
|
|
You can do something like this:
using System.IO;
FileStream s1 = File.Open("C:\\whatever.txt"); // Opening a file.
FileStream s2 = File.Open("C:\\whatever2.txt");
BinaryReader r1 = new BinaryReader(s1); // Easier reading.
BinaryReader r2 = new BinaryReader(s2);
if (s1.Length != s2.Length)
{
// Different sized files.
}
while (s1.Length != s1.Position)
{
if (r1.ReadByte() != r2.ReadByte())
{
// Difference found.
}
}
|
|
|
|
|
Hi!,EssOEss,
Thank you very much! It really works.
May god bless you and your families!
momer
|
|
|
|
|
Many Controls/Class have their own EventHandle , Such as Button.Click ,...
i want to write my own EventHandle for my own class.
but i dont understand it too much. The samples on MSDN are
a bit difficult for me.
are there some article concerning on this issue ?
|
|
|
|
|
It's is pretty easy to go for Custom Events( Own Event) in .NET. You need to cover few other techinics,if you want to go for this sort Custom Events and Event Handlers. You need to declare a deletegate for the event. Then need to encapsulate your code(Own Event handler code) into that delegate. Once you finish this, then you can declare an event of your delegate type. Then try to use your event where ever you want.
I seen lot of same question in CP discussion. And i know this much information is not sufficient for you people. Anyhow wait, in a couple of days i will write a nice article on Custom Events and Handling .
For the time being you can refer this articles.
Custom Events
Sreejith Nair
[ My Articles ]
|
|
|
|
|
There is an entire caregory on this topic. See "Delegates and Events".
|
|
|
|
|
|
Dear .NET Developers,
I need to do a report like Master Detail.For Example two reports are there test and test1.If I click the report test,test1 report should come.Is it possible to do like this.Help me.
radha
|
|
|
|
|
Although I don't know exactly what you are doing, I would put my details in a group and hide them but allow drill down. When the user drills down that section will display. If you are determined to make the drill down a separate report just embed the subreport in the hidden section and link it.
Let me know if you need further explanation.
ed
The absence of evidence is not evidence of absence.
|
|
|
|
|
Actually I need that one.Can you please tell me how to do
|
|
|
|
|
I have a control that expands when pressed. My question is how do I manange/move the other controls so nothing overlaps.
Also, how can I add a checkbox to a label before Text label. When I add it to label.Controls I just see the checkbox.
And last thing, in my class, I have label.autosize = false;
but when I add that control to the form, the VS 2005 sets the autosize property to true.
Thanks
|
|
|
|
|
There is no built in support for laying out controls. What you can do is derive from ContainerControl and catch the resize event for all the contained controls. When resize occurs you determine if you need to perform layout. If you do need to perform layout u can do something like this (psuedo-code):
int currentx;
int currenty;
foreach(control c in this.controls)
{
c.location = new point(currentx, currenty);
increment currentx and current y
}
>> how can i add a checkbox to a label
Whats the point of doing that?
|
|
|
|