|
HI,
I m creating a login page in asp.net..i need to use web service method and write stored procedure to check if user name and pwd are correct..if its right then need to direct the user to another page else display an error...since response.redirect wont work in web service can u suggest how to go about it???
|
|
|
|
|
Get The Status from web service like true or false and redirect from ur code..!
But Why would you use webservice to check if user name and pwd are correct.You can use normal method..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
How do we get the status????
Ya i know...but i m asked to use the webservice method for everything.
|
|
|
|
|
Check this Code..!
[WebMethod]
public bool Name()
{
If (Condition)
{
return true;
}
else return false;
}
In your Code..!
localhost.Service1 svc = new Service1();
bool ssd= svc.Name();
if(ssd)
Response.Redirect("YourPage.aspx)
First Try To learn abt the webservices usuage in asp.net
Calling Web Service using ASP.NET[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Check for web service status (i.e.,What is it return type), according to it process your code.
|
|
|
|
|
Are you calling the WebService from the client? If so then you’ll need to check the result in your success callback, if the user is validated then you can redirect using JavaScript window.location.assign("MyNewPage.htm")
|
|
|
|
|
Hi all,
I am new to ASP.Net and I want to add a user comments section to my web page. Is there a site that can help explain how, so I don't have to reinvent the wheel?
Thanks in advance.
Ken
|
|
|
|
|
Madmaximus wrote: Is there a site that can help explain how
Not really anything specific.
You just need to capture the comments, persist them and display them. Use a multi-line textbox to capture, a database to persist, and a label to display. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What is the website for? Is it a blog?
There are many, many open source projects out there that have the ability to add comments. The best implimentation I have seen is with BlogEngine.Net[^] The latest versions comment manager is simply fantastic and the C# code is quite readable.
Good luckJimBob SquarePants
*******************************************************************
"He took everything personally, including our royalties!"
David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager
*******************************************************************
|
|
|
|
|
We have a BizTalk application configured to never unload its DLL's to make it very responsive even if it is idle for a long time (this is a requirement). It works on the BizTalk, as I can see the DLLs stay loaded and the application executes in a sub-second time even if idle for hours (before that, idle-time response was 20 seconds).
Now, the orchestration is published as an ASP.NET web service, having its own application pool. IIS introduces a non-negligible overhead if it goes idle, so I instructed it to never recycle and to never shutdown. It works, as I can see the worker process holds the DLLs. This is fine but IIS recycles the worker process after some time (a couple hours or so), defeating the whole purpose (the idle-time response got down to 5 seconds, though, much better). The response time when not idle is below 1 second, and we would like to have the same idle-response time.
What else do I need to do to make this work (on the IIS side)?
Also, I noticed that even though we have a dozen application pools, there is only one w3wp.exe instance running. Is this normal?
|
|
|
|
|
Hello everyone,
How do I automatically redirect someone back to a page he/she wishes to see before taken to login or signup page?
Case Study 1: I want to shop online and I was to checkout and pay for the product, but the site mandated it on me that I must register with them before I could proceed (I think it's for profile purpose) or simply sign in if I am an existing user. Then after that, I was taken back to my checkout page, made payment and went out.
Case Study 2: I launched this site, view forum post and click to read one but was redirected to login/signup page. After successful login, I was automatically redirected back to the post I wanted to read.
Case Study n...
How can I implement same in my asp.net application?
Thank you all for your usual support.
|
|
|
|
|
You may want to reword this along the lines of:
How do I automatically redirect a user back to the page they wished to see after being taken to a login or signup page?
If so there are a number of ways depending on how you've set it up. If, for instance, you use Forms authentication then it will handle it for you (do a search on Forms authentication). You could also use attributes to seek authentication, either using built in security or custom attributes, etc, etc.
IN ohter words, you'll have to be more specific about your requirement; what have you already tried?Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
Realy, I haven't tried any method. But I am using Windows authentication. I create my own user database and coded their login, signup, etc... Because this is the most convenient way I can always achieve this.
Any further Ideas?
Regards
|
|
|
|
|
awedaonline wrote: Any further Ideas?
Yes, stop reinventing the wheel. Use the built-in login controls and authentication database if necessary. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Alright, I don't know how to achieve that. Please teach me the tricks. Note with my own created database and not aspnetdb.
Thanks for your responses.
|
|
|
|
|
Start here[^] and here[^] I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: Yes, stop reinventing the wheel.
That does not suit every occasion - it is wrong to tell people that. I've been on many projects where, for one reason or another, that was not considered suitable to our needs and we had to hand craft a solution that did suit.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
It is the appropriate response when implementing something that is already present in the framework. In this case authentication uses a provider model that can be extended to cover extenuating circimstance so again there is no need to reinvent what has already done. Redirecting to the appropriate page i s also provided via the built-in controls and model. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I fully undertand all that and have used it many times. But I've also not used it because we had other concerns or design issues or plain old bloody minded architects that didn't like it. Either way it is not the answer to everything.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
Nor is DIY I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I didn't say it was. What is your problem? You're not right: it isn't the only answer and I already said that custom wasn't either.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
What the hell is your problem? You start off with "That does not suit every occasion - it is wrong to tell people that."
That was a very offensive attitude to begin an open discussion with.
Followed up with "Your're not right" shows a lack of respect for other viewpoints and the people who present them.
There is no right or wrong, we have choices. I stand by my comments that in this case the OP should not be creating a mechanism that already exists. You can disagree, but you don't have to be disagreable. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: That does not suit every occasion - it is wrong to tell people that."
You found that offensive? Grow up: I thought that fairly polite. Take it howver you want, I suppose.
Mark Nischalke wrote: I stand by my comments that in this case the OP should not be creating a mechanism that already exists
Rubbish. There is always more than one way to skin a cat and just because MS give you something for free doesn't mean you have to use it.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
Mark Nischalke wrote: You can disagree, but you don't have to be disagreable.
Good advice - take it.Jon
"I don't think the human race will survive the next thousand years, unless we spread into space. There are too many accidents that can befall life on a single planet. But I'm an optimist. We will reach out to the stars." ~ Stephen Hawking,
Soap Box 1.0: the first, the original, reborn troll-less
|
|
|
|
|
If everything you do is custom then I might use Attributes to decorate the master page, if you have one, or every page other than the login page if you don't that just does:
1: Is this user logged in? (Could be accomplished by populating a session variable upon successful login).
2: Yes: allow access to any page. (You could also have stored the selected page in a session variable).
3: No: redirect to login.
Attributes are fairly simple to create so you can look that bit up: I'm sure there are plenty of articles on CP that will help.
I'm also sure there are other ways to do this and perhaps someone else can offer further suggestions.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|