|
You dont need arm parts to fix a timer...
|
|
|
|
|
I don't know if I'm writing in the right topic but I hope it...
I've done a web site that allows file access only to certain users (registered). If a user is not logged in it has to do it before access to files.It works with cookies.
Is really simple to do this steps with the browser but I have no ideas on how to do it with c# code... I thought that I can do the login by calling the page login.aspx and to put the autenthication credential in the http body( POST METHOD). The question is: how can I do it?
I'd like to do: CALL FROM CODE THE URL "www.mywebsite.com/login.aspx?username=myid&password=pass"
(this is the GET method I'd like to use POST of http)
How can I intercept the data from the server?
Thanks to everyone will reply me...
|
|
|
|
|
Is this what you are after?
http://msdn.microsoft.com/msdnmag/issues/01/09/cweb/[^]
I assume you know how to read post/get submissions from a asp.net webpage... its a little hard to read your english so i assumed you want something similar to the link i posted?
-- modified at 22:54 Sunday 8th July, 2007
To give you a more 'workable' idea:
New C# Project, add a button and a listbox (make it fairly wide)
add a new using:
<br />
using System.Net;<br />
then add this to the button code:
<br />
WebRequest MyRequest = WebRequest.Create("http://mmo.shadowdevelopment.com/default.aspx?TEST=Bob");<br />
WebResponse MyResponse = MyRequest.GetResponse();<br />
<br />
for (int iC = 0; iC < MyResponse.Headers.Count;iC++ )<br />
{<br />
listBox1.Items.Add(MyResponse.Headers.Keys[iC] + ": " + MyResponse.Headers[iC]);<br />
}<br />
MyResponse.Close();<br />
Thats a link to a test page on my domain so it wont be up forever but as you can see there is a Set-Cookie: header you need to read this value and re-send it with any other request (and each time it will send a new one back) that will identify your requests with the correct session store on the server and allow you to do whatever you want while being logged in on a website using a normal c# application.
Always more to learn, and i wouldn't have it any other way.
|
|
|
|
|
cardy1 wrote: calling the page login.aspx and to put the autenthication credential in the http body( POST METHOD).
This[^] article was written to help you do exactly that!
/ravi
|
|
|
|
|
firs I want to thank you for replying me.
GIS stands for gegraphic information system.in this project as I told you I'm looking for a control in c# that has the ability to view any kind of map;also I want to define tools for zooming ,surching and etc.
|
|
|
|
|
Why not just use google maps ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i need to know that if a C# application is maintainig a database and if data is entered in a mobile application built in j2me then how it can be done that the data entered will be stored in the C# application? i m anxiously waiting for replies.Thanks
regards
amna
regards
|
|
|
|
|
I'm not sure I follow, you seem to be talking about two apps connecting to the same data store. If this is true, it will just work, the j2me app updates the common database, and the C# app will find it the next time it reads it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: you seem to be talking about two apps connecting to the same data store
That is how I read it, too.
"That's no moon, it's a space station." - Obi-wan Kenobi
|
|
|
|
|
I want to print a form on wireless printer from windowsCE 5.0 device
with C# programming language in Visual Studio.net2003
-- modified at 17:18 Sunday 8th July, 2007
|
|
|
|
|
|
I'd imagine that normal printing code would work
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The link Judah provided looks like a start. Like Christian said, shouldn't be any different. Just use what the framework offers and let the OS do the rest.
"That's no moon, it's a space station." - Obi-wan Kenobi
|
|
|
|
|
Is anybody now, how to get the date now from DateTime object or other data objects of C# class.
Thanks in advance.
|
|
|
|
|
|
Kevin I have tried this but it is not working in 2.0 in my visual express, is it working in yours?
|
|
|
|
|
With the advent of intellisence couldn't you have figured that one out for yourself?
It really depresses me the level of questions I see here. Does no one take the time to try and figure things out for themselves any more?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
At least he didn't say it was urgent, need answer now
only two letters away from being an asset
|
|
|
|
|
There was a deadline tho, he wanted to know today's date...
|
|
|
|
|
That was the best thing I've read in months!
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
He was kind enough to add the valuable information "C#" to the subject line, so that we would know that it was actually a C# question that was posted in the C# forum.
He failed to ask us to send the replies to his e-mail address, though.
---
single minded; short sighted; long gone;
|
|
|
|
|
I'm just waiting for the Satips reply now.
only two letters away from being an asset
|
|
|
|
|
I think he's using Visual C# 6.0, where intellisense fails always.
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
I am using Visual Web Developer 2005 express edition and maybe it is failing but it is not working in my intelisence
Thanks for reply
|
|
|
|
|
I am not sure why but in my intllisense that comes with Visual Studio Express there is nothing for date now. Most places including msdn showing
DateTime.Now should work, but it isn't working with .net 2.0. If it working in yours please let me know if you don't mind.
|
|
|
|