Showing posts with label functions. Show all posts
Showing posts with label functions. Show all posts

Wednesday, March 28, 2012

Postback Multitask progress bar (ajax)

hello

I have a asp.net page that takes several actions uppon a button click.

Suppose this page triggers 3 functions on that button click: (THIS IS JUST AN EXAMPLE)
1) Saves data to local data base
2) Export data do internet data base
3) send emails to 50 users reporting this update

What I want to do is show the user wich action the server is performing at the moment.
basically, it should show (on a Modal PopUP, i figure) all the 3 steps taken.
1) ...saving data...
2) ...exporting data ...
3) ... notifying users ...

does anyone have a solution for this?

thanks

Checkout this threadhttp://forums.asp.net/t/1133013.aspx

Monday, March 26, 2012

prevent ajax functions used by Malicious users using HTTP POST

Hi Guys ,i have a problem in my site,i m having a class which is having ajax functions,problem is that Malicious users can access these ajax functions method using HTTP POST.so that he can do all the task using HTTP POST.

in config file i write following code.

<httpHandlers>

<addverb="POST,GET"path="ajax/*.ashx"type="Ajax.PageHandlerFactory,eAjax"/>

<addverb="POST,GET"path="ajaxpro/*.ashx"type="AjaxPro.AjaxHandlerFactory, AjaxPro"/>

</httpHandlers>

the malicious user use the functions using following Code.

Post

/ajax/al2006.ajaxFunctions,al2006.ashx?_deleteusers&_session=no.

so i want to prevent that problem.so pls give me any suitable solution of this.shall be thankful to all.

Thanks in Advance.

jkyadav

You can use the following line of Code in your Generic handler to check if the User is Authenticated:

if (HttpContext.Current.User.Identity.IsAuthenticated)
{
//Do what you need to do for authenticated users
}