Security :: Calling The LoginControl From Another Page Or A Webservice Method

Jul 19, 2010

I am using the Login Control and the Login.aspx page for Login authentication. How can I call login from another page or a webservice method with a Userid and password parameters.

[Code]....

View 3 Replies


Similar Messages:

Auto Complete Extender Not Calling The Webservice Method?

Apr 4, 2011

auto complete Extender not calling the webservice method the exact problem is ., Am using AutoComplet Extender in Example project its working fine. but the same code(aspx code as well as webservice code) am using in my live project its not calling the web service method. my live project is dotnet 2.0 version

[Code].....

View 1 Replies

AJAX :: Server Method Timed Out - Calling Webservice From JavaScript

Apr 20, 2010

I get this error "The server method xxx timed out." calling a WebService that internally does a hard query to the database, and takes some time. I use this method to change the webservice timeout, but it does not seems to do anything (the timeout errors appears in less than a second).
MyService.set_timeout(100000);

View 2 Replies

Security :: Calling A Java Webservice Using Credentials From Application?

May 19, 2010

I am using Asp.Net application for calling an existing Java webservice. Recently the web service is configured with Security certificates. Now I need to call the webservice using "https:URL .." and by passing the credentials i.e. UserId and Password.

When I call the webservice using [URL] I get the below error. Is the change in my code is causing this error?

Error:Client found response content type of 'text/html; charset=iso-8859-1', but expected 'text/xml'. The request failed with the error message: --

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

IBM_HTTP_Server Server at ............ Port 443

View 1 Replies

Security :: Calling SharePoint Search WebService From AJAX Service Fails With 401

Jul 12, 2010

In IIS I have a virtual directory with only windows authentication enabled. From Javascript I call into a ASMX webservice. From the ASMX webservice I make a call to the SharePoint Search.asmx Webservice. whatever I try I keep getting the followin gerror message:

"The request failed with HTTP status 401: Unauthorized"

I use the following code to call the SharePoint webservice

[Code]....

My web.config settings are:

[Code]....

The Sharepoint farm is configured to use NTLM authentication.

Strangely everything works when I am testing in Visual Studio using the builtin webservice, but when I deply to my local IIS or Test Server it breaks.

View 1 Replies

Security :: FormAuthentication Ticket Without Using LoginControl?

Jun 12, 2010

I am developing a asp.net application using SQLServer 2008 and I have a page "Default.aspx" in which i have userID and Password textboxes and a SUBMIT button. Here is the script I am using to authenticate.

[Code]....

Well now i want to know that by using FormAuthenticationTicket how can I check on other pages if user is authenticated user cause in the URL if i just change the page like "Main.aspx" and hit it takes me there which should not happen and redirected to Login page.

How should i check on every page on page load event if user is authenticated or not and if not then redirected to Login.aspx.

View 1 Replies

Security :: Prevent Logincontrol From Fullpostback?

Feb 13, 2010

I have a ajaxPopupExtender in where I placed a login control. But when I login i get a full postback. I've tried to put it all in an updatepanel but that didnt help.

What I want is for the client to login from the popup Window, in case of login error I want to show that error message in popup (still visible). But if the login in successful I can in codebehind do a full postback.

As of now, even when error is presented the page is doing a full postback and the popupExtender with login control is collapsed.

View 2 Replies

Security :: Way To Assign Session Variable Into LoginControl

Apr 2, 2010

i got one register page and register confirmation pagethe first page i use it to let user enter all the data to registerfor the second page, i put a createuserwizard and use session to display all the entered data here problem is, all the data in label form can show except username, password and e-mailWhich i make them textboxI have declare them in the Page_Load (I use username only as example since all field is about the same)

[Code]...

View 1 Replies

Web Forms :: Calling Javascript Method During Page Load From Content While Using Master Page

Mar 30, 2010

I want to call a javascript method during page load. I am using application.master of the sharepoint server 2007 as the master page . In the content page i want to call a custom method named OnLoadFun() during loading the content page. I have written the function inside script tag in the PlaceHolderAdditionalPageHead id section of the content page.

[Code]....

How do i call the OnLoadFun method so the i is being called onload time. i tried putting window.onload=OnLoadFun surrounded by script tag within the PlaceHolderMain content section.

View 1 Replies

Security :: Capture User Entered Password Using LoginControl?

Nov 2, 2010

We use the LoginControl to authenticate our users. For this particular site, security isn't a HUGE concern but the Membership provider allowed us to customize the users menu and do some other handy things.

Lately, our Customer Service department has been complaining that there is something wrong, because many users are being "locked out". What I would like to do is capture the login and password (I know how to get the login) and log it to our SQL database. Is there a way to get the un-encypted password? I am pretty sure there isn't but thought someone might know a workaound (without using a custom control of something of that nature).

View 2 Replies

C# - Calling Method On Master Page From WebMethod

Aug 4, 2010

, imagine a Master page that implements IFooMaster with a method

ShowFancyMessagePopupTheBusinessCantLiveWithout(string message);

I am in a page that inherits this master page. Upon a checkbox being unchecekd, I want to show a message to the user that if they save it, they can't re-check the checkbox without some admin action.

I've been given feedback that I can't just use an alert('message'); in javascript because they want the consistent look of these messages.

Next, I tried to make an ajax call via PageMethods (as that's what everything else in this codebase uses) to show a message. My problem lies in this method being static.

[WebMethod]
public static void ShowSuperImportantMessage()
{
if(!checkboxICareAbout.Checked)
((IFooMaster)Master).ShowFancyMessagePopupTheBusinessCantLiveWithout("If you uncheck that thing, you can't recheck it.");
}

Since ShowSuperImportantMessage() is static, I can't access Master from within. The method on the master page looks more or less like this:

public void ShowFancyMessagePopupTheBusinessCantLiveWithout(string message)
{
lblGenericMessage.Text = message;
btnGenericMessageOK.Focus();
upGenericMessage.Update();
mpeGenericMessage.Show();
}
mpeGenericMessage is an ajaxtoolkit:ModalPopupExtender.

upGenericMessage is an update panel.The other 2 are obvious.

Can I do some jQuery kung-fu to show that stuff? I tried, but the solution complained that the controls I tried to refer to by ClientID didn't resolve since they were on the Master page.

quick edit: Before anyone tells me the architecture is a problem, or I shouldn't have put such a thing on a master page, or w/e...

I know the situation is not ideal, but I this is inherited code, and I can't drop it all and rewrite half of their web stack.

View 3 Replies

Web Forms :: Which Is The Method Providing The Web Page Calling Another Web Page

Feb 3, 2010

let us say 'default.htm' (.aspx is not possible due to whatever reason) is "calling" 'start.aspx' as following:

<a href="start.aspx"></a>

now i would like to have a method in 'start.aspx' letting me know, from which page 'start.aspx' had been "called" (in my sample this would be 'default.htm'). what would the c#-code look like?

View 9 Replies

C# - Calling A Codebehind Method From Aspx Page From Gridview?

Nov 23, 2010

How do you call a codebehind/class method from a gridview in an aspx page? Also, I need to pass the value of databound column to that method. Is this possible?

Something like this:

<asp:BoundField DataField="Precision" />
<asp:BoundField DataField="MyNumber" DataFormatString="FormatHelper.Format(MyNumber, Precision)" />

View 3 Replies

Web Forms :: Finding The Calling Page Of A Class Method?

Jul 27, 2010

I have the following method in a class withing a website.

public static void Authorise(int role, Page callingPage)
{
callingPage.Master.FindControl("divUnauthorised").Visible = true;
callingPage.Master.FindControl("ContentPlaceHolder2").Visible = false;
}

Now this works fine but I really want to just have the one parameter of role and not require the page to pass itself into the method. Is there a way of finding the object that called the method and casting it to a System.Web.UI.Page?

View 2 Replies

C# - Calling A Method On The Parent Page From A User Control?

May 3, 2010

I am using a user control that I created (just a .cs file not an .ascx file), that does some magic and depending on a value generated by the control, I need it to do something on the parent page that is 'hosting' the control. It needs to call a method under certain circumstances (method is on the parent control).the control is placed on the parent page like so:

<customtag:MyControl ID="something" runat="server" />

I'm dynamically creating buttons etc on the control itself but when a button is clicked, let's say for example that there's a text box on the control and if the value of the textbox is "bob" it needs to call a method on the page that's housing the control...how can I accomplish this?

View 3 Replies

Web Forms :: Calling Master Page Method From A User Control?

Apr 5, 2010

Does anyone know how I would go about calling a method found in the master page code behind from a user control's code? The user control is on the master page. The method I want to call is public.

I can easily call a method found in the pages code behind using:

Page.GetType().InvokeMember("TheMethodsName", System.Reflection.BindingFlags.InvokeMethod, null, this.Page, null);

or I can call a method found on the master page from my aspx page code behind using:

((MasterPage_MasterPage)Page.Master).TheMethodsName();

But I am stuck because I can't find the MasterPage in my user control code behind.

View 4 Replies

Web Forms :: Calling A Page Method Using InvokeMethod From An User Control?

Jan 18, 2011

I have an aspx page which has an usercontrol say UC1 for selecting query paramters.

UserControl uc1 in turn opens another user control (UC2) as a modal popup.

1. On OK click, I am setting the values of another usercontrol (uc1) from the control uc2 by invoking a page method(doAccept). It appears to call the method and values seems to be set. But the problem the usercontrol/page does not display the new value or in otherwords it is not refreshed.

If the above is not possible is there any other way to refresh the parent page.

[Code]....

View 3 Replies

Web Forms :: Calling A Public Method On Aspx Page From A Usercontrol

Sep 7, 2010

I have a problem with calling a method on a aspx page from a usercontrol.

The case is: I have 1 main page with 5 usercontrols, when something goes wrong in the code I want to display the error message in a Modalpopup Extender. I can create for each usercontrol a different modalpopup extender but isn't much easier when I make 1 popup in the aspx page. But the problem is: How should I call a method in the aspx page that open the popup?

I have search several hours on the internet but can't find anything useful.

View 2 Replies

AJAX :: Calling Parent Page Method From User Control?

Oct 3, 2010

I looked up the threads about this. But I couldn't do it...

this is my method in aspx.page:

public void MesajlariGetir()
{
DataSet ds = new DataSet();
SqlConnection con = new SqlConnection();
SqlCommand cmd = new SqlCommand("msjlarigetir", con);

[Code]....

View 4 Replies

AJAX :: Trying To Enable Rest Of The Panes By Calling The Function ShowPanes In The Main Page By Using Invoker Method?

Sep 28, 2010

In the content page, I have an ajax accordion pane with couple of panes. Within each of those panes there is 1 user control. Initially all the panes except the first one (AccordionPaneMain) is enabled. The first pane user control contains a form view . In formview itemcommand I am doing some processing and then was trying to enable rest of the panes by calling the function showPanes in the main page by using invoker method. My problem is, the method (showPanes) is getting executed but the panes are not enabled.

Sections of code below

[Code]....

View 7 Replies

C# - Validating Textbox Content On Blur By Calling Server - Side Method Without Affecting Page Behaviour

Oct 21, 2010

I have a textbox in one grid-view column where upon entering a particular value and losing focus of the textbox, should post to the server to get the text validated through a server-side method. If the entry is valid, a result set to fill rest of row cells would be returned, else the bgcolor of the textbox needs to be changed to Red.

I tried posting back through the obvious way, i.e. making the textbox's autopostback as true and wiring up a server-side OnTextChanged event handler to validate the entered value.

It is working with this setup, but is also affecting the remaining page controls behaviour. For example, if I click a button in some other grid after entering some text in the textbox, the OnTextChanged handler gets called thus preventing the button's click event, which I also wish to call to execute its functionality.

View 2 Replies

AJAX :: Calling Webservices From Javascript: OnError Method, How To Identify The Method

Aug 26, 2010

I have an application that has JS calling ASMX files to do asyncronous requests, using ASP.NET AJAX.

The problem is that I use always the same "onError" function, and now I don't know how to identify the method that rised the error, and it is giving me a lot of problems to debug errors. The parameter "data" of the onError method does not give enough information, for
example:

en System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)
en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)
en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer)
en System.Web.Script.Services.WebServiceMethodData.StrongTypeParameters(IDictionary`2 rawParams)
en System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)
en System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)
en System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)

Is there any way to know the webmethod that raised the error?

View 1 Replies

AJAX :: Calling A Regular Method From Within A Web Method?

Nov 1, 2010

i have a web service that i use for the AutoCompleteExtender, let the below code show you what i'm trying to do: [Code]....

this method is called, and when it calls the method inside the Patients Class, it gets lost. does that mean that i can't use 3-tier approach with web methods?

View 2 Replies

ASP Webservice Calling WCF Service?

Oct 27, 2010

I have almost the same problem as you have described in [URL] service. I have a asp.net webservice that calls a WCF service. On my development machine this is working fine. But if i deploy my ASP.net Webservice it is not working. Both the ASP Webservice en WCF service needs my cridentials. How did you solved your problem. In the logging of the WCF service I see that my credentials is not passing to WCF.

View 1 Replies

JQuery Not Calling Webservice

Feb 6, 2011

I am new to programming especially jQuery and webservices. I want to pass the values to the to database via the webservice. Below is the code for the .aspx page:

<html xmlns="[URL]xhtml">
<head id="Head1" runat="server">
<title></title>
<link href="[URL]"
rel="stylesheet" type="text/css" />
<script src="[URL]" type="text/javascript"></script>
<script src="[URL]"
type="text/javascript"></script>
<script src="[URL]"
type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#sortable").sortable();
$("#sortable").disableSelection();
$("#sortable input[type=text]").width($("#sortable img").width() - 10);
$("#sortable label").mouseover(function () {
$(this).parent().children("input[type=text]").show().val($(this).html());
$(this).hide();
});
$("#sortable input[type=text]").mouseout(function () {
$(this).parent().children("label").show().html($(this).val());
$(this).hide();
});
$(".ContainerDiv").hover(
function () {
$(this).find(".deleteClass").show();
},
function () {
$(this).find(".deleteClass").hide();
});
$(".deleteClass").click(function () {
$(this).closest("li").remove();
});
$("#orderPhoto").click(function () {
var photos = $.map($("li.ui-state-default"), function (item, index) {
var imgDetail = new Object();
imgDetail.Id = $(item).find("img").attr("id");
imgDetail.Caption = $(item).find("label").html();
imgDetail.Order = index + 1;
return imgDetail;
});
//photos contains all the photo and order and the chhanged caption.
//pass to server
$.ajax({
type: "POST",
url: "WebService.asmx/updateOrder",
data: JSON.stringify(photos),
contentType: "application/json; charset=utf-8",
success: function (data) {
if (data.d === "saved") {
$("<p>").text("New order saved!")
.addClass("success").appendTo("#left");
} else {
$("<p>").text("Save failed")
.addClass("failure").appendTo("#left");
}
}
});
});
});
</script>
<style type="text/css">
#sortable
{
list-style-type: none;
margin: 0;
padding: 0;
}
#sortable li
{
position: relative;
margin: 3px 3px 3px 0;
padding: 1px;
float: left;
text-align: left;
}
.deleteClass
{
/* PhotoListItem is relative so relative to it */
position: absolute;
top: 1px;
right: 3px;
background: black;
color: Red;
font-weight: bold;
font-size: 12px;
padding: 5px;
opacity: 0.60;
filter: alpha(opacity="60");
margin-top: 3px;
display: none;
cursor: pointer;
}
.deleteClass:hover
{
opacity: 0.90;
filter: alpha(opacity="90");
}
.image_resize {
width: 250px;
height: 250px;
border: 0;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ListView ID="ListView1" runat="server" GroupItemCount="15">
<LayoutTemplate>
<ul id="sortable">
<li id="groupPlaceholder" runat="server">1</li>
</ul>
</LayoutTemplate>
<GroupTemplate>
<tr id="itemPlaceholderContainer" runat="server">
<td id="itemPlaceholder" runat="server">
</td>
</tr>
</GroupTemplate>
<ItemTemplate>
<li class="ui-state-default">
<div class="ContainerDiv">
<div class="deleteClass">X</div>
<img id='<%#Eval("photo_id")%>' src='<%# "uploads/"+Eval("photo_file_name")%>' alt="" class="image_resize" />
<div style="height: 25px; margin-top: 3px">
<label>
<%# Eval("photo_title")%></label>
<input type="text" style="display: none" />
</div>
</div>
</li>
</ItemTemplate>
</asp:ListView>
<input type="button" id="orderPhoto" value="Save change" />
</form>
</body>
</html>

I used the debugging tool and can confirm that the photos contains the correct values. Its just calling the webservice part that I am unsure about.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved