|
Hello All,
Thank you for reading this post. Iam trying to build a single sign on, so that other applications in my company can be reached by just logging once. Here is how it is:
1. Lets say the site i build is called abc.com
2. I want the user to logon to abc.com, all my user info is in a SQL Server database
3.Once login is determined successful, we go to a welcome page in abc.com... From abc.com, there is a link called link1.abc.com which is a different application... here i dont want the application to ask for logon credentials again, it should give access to the user because user was validated in abc.com
4. Expanding this...how to I provide this service if i have more that 3 applications...???
My company cannot afford LDAP...all we have is a good SQL Server database, .NET 2005...what is the quickest and best way to acheive single sign on ???
Sample code, articles explaining things are very very welcome !!
Thank you
RH
|
|
|
|
|
If you have a single SQL Server database, then I'd imagine what you need is a database in there of who is logged on, which is shared between applications.
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 )
|
|
|
|
|
my button click event is not being fired. Asp.net 2.0
why is that?
|
|
|
|
|
Make sure UseSubmitBehavior is set to true and as well as cause validation is set to true....
|
|
|
|
|
i did. it still doesn't work. i tried a link button instead. that doesn't work either.
however, if i am in debug mode both events work.
|
|
|
|
|
Oh, Have you check your AutoEventWireup property...
AutoEventWireup=true
|
|
|
|
|
i don't see that property
|
|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RepeaterFormControl.aspx.cs" Inherits="RepeaterFormControl" %>
This is one of the page attribue. I don;t know how have set your event delegates. So try with true and also fith false......
All the best...
|
|
|
|
|
When an user clicks on a button click event and after the event got executed, if he hits on F5 key or Refresh button, the same button click event executes once again. How i can avoid this in ASP.Net 2.0.?
Moreover i clear all the controls, so that it should fire javascript for mandatory fields. Instread of that it is rerading the values from cache.....
I tried Button, HTML Submit and as well as ImageButton....But same behaviour....
Source Code:
public partial class RepeaterFormControl : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
GetDataFromDatabase();
if (!(IsPostBack))
{
Button1.Attributes.Add("onclick", "return ValidateInput();");
}
}
private void GetDataFromDatabase()
{
SQLDataAccessHelper daHelper = new SQLDataAccessHelper();
this.Repeater1.DataSource=daHelper.ExecuteReader(CommandType.StoredProcedure, "GetFormViewData");
this.Repeater1.DataBind();
}
protected void clearControls()
{
((TextBox)(FormView1.FindControl("TxtFName"))).Text = "";
((TextBox)(FormView1.FindControl("TxtLName"))).Text = "";
((TextBox)(FormView1.FindControl("TxtEmail"))).Text = "";
((TextBox)(FormView1.FindControl("TxtDob"))).Text = "";
}
protected void btnSave_Click(object sender, ImageClickEventArgs e)
{
String sFname = ((TextBox)(FormView1.FindControl("TxtFName"))).Text.ToString();
String sLname = ((TextBox)(FormView1.FindControl("TxtLName"))).Text.ToString();
String sEmail = ((TextBox)(FormView1.FindControl("TxtEmail"))).Text.ToString();
string sDOB = ((TextBox)(FormView1.FindControl("TxtDob"))).Text.ToString();
String sCountry = ((DropDownList)(FormView1.FindControl("CmbCountry"))).SelectedItem.Text.ToString();
SQLDataAccessHelper daHelper = new SQLDataAccessHelper();
IDataParameter[] objparam;
objparam = daHelper.GetSpParameterSet("AddFormViewData");
objparam[0].Value = sFname;
objparam[1].Value = sLname;
objparam[2].Value = sEmail;
objparam[3].Value = sDOB;
objparam[4].Value = sCountry;
daHelper.ExecuteNonQuery("AddFormViewData", objparam);
GetDataFromDatabase();
clearControls();
sFname = "";
sLname = "";
sEmail = "";
sDOB = "";
}
}
And ASPX code....
<asp:imagebutton id="btnSave" runat="server" ImageUrl="Images/btnsave.gif" tabIndex="10" Width="82px" OnClick="btnSave_Click"></asp:imagebutton>
Thanks
Amit
-- modified at 14:43 Monday 23rd July, 2007
|
|
|
|
|
Here is the reply
http://aspalliance.com/articleViewer.aspx?aId=687&pId=-1
Thanks!!
|
|
|
|
|
Hi all?
Can IIS 7.0 be installed on windows vista?
Is there an option called Windows authentication on IIS 7.0?
Regards
|
|
|
|
|
Stop cross posting and you may get a reply.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: Stop cross posting and you may get a reply.
He needs to see the one I gave him. Granted it is a google search, it pretty much gives him alot of information at his fingertips
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I am trying to install IIS 7.0 in windows Vista operating system.I cant find an option called windows Authentication on IIS 7.o.
What is the option that substitute this Option(windows authentication).
Please advice
Thanks
|
|
|
|
|
Stop cross posting and you may get a reply.
only two letters away from being an asset
|
|
|
|
|
Geeze, another cross post by the OP
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hello guys, I was wondering how do I delete a particulat record from a data grid. In other words I'm displaying bunch of messages to teh user and then there is going to be a button that will allow us to delete the message that is selected (by the way, Data grid has a check box colum which needs to be checked and the checked message would be deleted). Now I know that in 2.0, the Grid view has built in supprot for updates and deletes, but this button (DELETE) needs to just show up at the top just once in the header and not next to every single row in the data grid...could some one tell me how do I go through each row in grid view, and based on what's checked, delete that record from the Data base.
Thanks
|
|
|
|
|
Can someone please help me with this....THanks
|
|
|
|
|
Don't be so impatient. No one is required to answer your questions, it is all voluntary here. If you want immediate answers call the support number.
only two letters away from being an asset
|
|
|
|
|
You have a couple of options with this. First you can put the delete button outside of the gridview all together. I have done that before when you have a check box to say which row to delete. Otherwise if you want the delete button to only show up once, I have used the pager template for that. There are a few issues that have to be overcome. Like you need to turn paging on and if the number of items is less then your page size your pager template hides it self so you have to make it visible again. So by far the easiest thing to do is put the delete button outside of the gridview.
Hope that helps.
Ben
|
|
|
|
|
Thanks Ben, that’s probably what I’m going to end up doing. Since you did it as you mentioned, would you be able to show me some code sample…I mean there’s help available online if you are using the built in grid view Delete row feature (without the checkbox and one delete button implementation)…but I couldn’t find any code examples for the scenario we are dealing with. Could you please help me out???
Thanks
|
|
|
|
|
I can send you some code, but it is in C# I don't know if that matters and I was using a object datasource that was returning a generic collection of an interface. So that might not be exactly what you are dealing with. Let me know if you still want to see the code.
Ben
|
|
|
|
|
Thanks once again Ben, yes I’d def like to see what you’ve got since I’m kind of stuck out here, also I’m using C# as well. In my case too, there’s an object datasource which brings back all the messages ( by calling the method GetAllMessages() and then I’m brinding that object directly against the datagrid (gridview) . The problem I’m having is what to put in protected void Deletebtn_Click(object sender, EventArgs e) Delete’s button’s event handler.
Right now, I’m just calling the DeleteRow method on the GridView from with in the Delete button click event handler.
Also, the actual Row_Deleting event needs to perform the deletion….isn’t that right, so I’d have to do the actual Database delete in the following:
protected void messageGridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
Perform delete here ????
}
Yes, so your code will def help.
Thanks once again Ben.
|
|
|
|
|
For the delete button outside of the grid view here is the code I am using:
NOTE in all my gridviews I have the first column in the gridview be a template column that has a label that contains the database table unique id. I mark this label as not visible, so it doesn't show up on the web page, but it is in the code behind, so I know what datarow I am dealing with.
protected void lBtnDeleteList_Click(object sender, EventArgs e)
{
if (SomethingChecked() == 0)
{
this.custValidatorSendtoEmail.ErrorMessage = "Please check a list to delete.";
this.custValidatorSendtoEmail.IsValid = false;
return;
}
GridViewRow gvr = null;
Label listID = null;
for (int i = 0; i < this.GridView1.Rows.Count; i++)
{
gvr = this.GridView1.Rows[i];
if (((CheckBox)gvr.FindControl("chkBoxSelect")).Checked)
{
listID = (Label)gvr.FindControl("lbListID");
this.ObjectDataSource1.DeleteParameters["ListID"].DefaultValue = listID.Text;
this.GridView1.DeleteRow(i);
}
}
}
private int SomethingChecked()
{
int ret = 0;
foreach (GridViewRow gvr in this.GridView1.Rows)
{
if (((CheckBox)gvr.FindControl("chkBoxSelect")).Checked)
{
ret += 1;
}
}
return ret;
}
Hope that helps.
Ben
|
|
|
|
|
Thanks Ben, SomethingChecked() func makes perfect sense, this is how I did It too; however my data grid’s first column is a checkbox column with the item template like this:
<asp:templatefield headertext="Select All">
<itemtemplate>
<asp:checkbox id="testChkBox" runat="server">
Since I have the message ID that I’m getting from that object I told you about also saved in the database, what I could do is add another column before the checkbox colums with the label displaying the Message ID (and then make it’s visibility attribute false).
So now looking at your code, the part I’m not understanding is
if (((CheckBox)gvr.FindControl("chkBoxSelect")).Checked)
{
listID = (Label)gvr.FindControl("lbListID");
this.ObjectDataSource1.DeleteParameters["ListID"].DefaultValue = listID.Text;
//Note we have set up a delete method in the object data source to take in the
//listid and delete that list.
this.GridView1.DeleteRow(i);
}
Specially where you have ObjectDataSource1.DeleteParameters["ListID"].DefaultValue = listID.Text;
I’m assuming that this method (DeleteParameters) is something that is custom written by you in that ObjectDataSource1 object. I’m getting a little confused here. Could you give me some pointers for my specific situation????
Thanks
|
|
|
|