|
Hi,
By default Asp.Net applications uses Windows authentication
It is not necessary to use Forms Authentication for all Asp.Net applications
Forms Authentication is a system in which unauthenticated requests are redirected to a Web form where users are required to provide their credentials. Upon submitting the form, and being properly verified by your application, an authorization ticket is issued by your Web application in the form of a cookie. This authorization cookie contains the user's credentials or a key for reacquiring the user's identity (e.g. therefore making the identity persistent). In essence, Forms Authentication is a means for wrapping your Web application around your own login user interface and verification processes.
|
|
|
|
|
Thank you Sir,
By your mean that, I can use "Windows" authentication too for the Web applications which are even run on Internet too, and it has no relation. And they need not be(not compulsory) running on intranet.
And "Forms" authentication is for the applications which have to have security system embedded within the application itself. Is it right?. Please tell me. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
OK - I'm going to weigh in here and say "Excellent posts". 10 out of 10 for the way you are handling this one. It shows research and a desire to understand further - and that's all we were asking.
Anyway, you use Forms authentication for custom authentication and Windows authentication to authenticate users using Windows authentication. I don't mean to make it sound like a cop-out, but the name says what they are. What the name doesn't show is why you would use it.
In an Intranet you will be authenticating the users on a company network, where you have access to the domain login information. Using this ASP.NET can get the login details from the domain directly. In this scenario, you would use Windows authentication.
Forms authentication relates to when you are operating beyond the use of domains, say on an internet site or where the login should be handled in a none-standard fashion. In this case, you need to handle the authentication yourself. This is where you use Forms authentication.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Dear Pete,
Thank you for your patience reply. But, can you please tell me, cant I use the windows authentication for the site which runs on the Internet if I wanna do it. Should I complesoury go for the Forms authentiation only, for the site which runs on the Internet. Please tell me patiencely, dont mind. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
The thing about Windows authentication is that you must be able to authenticate within a domain that you can see. In other words, you can't get login information from somebody else's network. This means that you must rely on Forms authentication if you want somebody to log in to your site on the internet. Of course, if you don't want any security, i.e. your pages are open to everybody, then it doesn't matter what authentication mode you have because you aren't going to be restricting pages.
I hope that this makes sense.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Yeah its great and more than sufficient. Thank you, very much.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
pls send me sql connection string
i write this sql string =
SqlConnection conn = new SqlConnection("workstation id=TIPL2;packet size=4096;integrated security=SSPI;user id=gayatri;password=gayatri;persist security info=False;initial catalog=eSRS");
but when connection open that time i have error---
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
pls solve this problem
thanku
Gayatri
|
|
|
|
|
Try doing this:
In the Class define 2 variables SqldbCon and strConnection and write the function GetConnection to open the connection.Define this
<appSettings>
<add key="DbConnection" value="server=buddha;database=TMM;uid=TMM;pwd=TMM098" />
</appSettings>
in ur Web Config file.Fillowing is the way.
Dim SqldbCon As SqlConnection
Dim strConnection As String
Public Function GetConnection() As SqlConnection
strConnection = System.Configuration.ConfigurationManager.AppSettings.Item("DbConnection").ToString
If IsNothing(SqldbCon) Then
SqldbCon = New SqlConnection(strConnection)
End If
If SqldbCon.State = ConnectionState.Closed Or SqldbCon.State = ConnectionState.Broken Then
SqldbCon.Open()
End If
Return SqldbCon
End Function
Hope it will help u.
|
|
|
|
|
For closing connection you can use the following function
Public Function CloseConnection()
If IsNothing(SqldbCon) = False Then
If Not (SqldbCon.State = Data.ConnectionState.Closed) Then _
SqldbCon.Close()
SqldbCon = Nothing
End If
End Function
|
|
|
|
|
hi
i want required filed validation on button control.
pls help me
|
|
|
|
|
What do you mean?
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
Hi,
I am using asp.net 2.0 and working with creating reports.
I have shown the Output (Report) in the web page using several GridView, Details view, etc. by binding with the database Sql Server.
I wish to SAVE the entire (report) page, how I am seeing the page actually in the page, as MS WORD (.doc) format. Because I wish to send this file as a attachment to the client.
Anyone can give me the clue for this? Thanks.
Regards,
Jay
|
|
|
|
|
hi
use the code given below this will be usefull
protected void word_Click(object sender, EventArgs e)
{
//string attachment = "attachment; filename=f.xls";
SqlDataAdapter da = new SqlDataAdapter("select * from empdata", cn);
DataSet dsExport = new DataSet();
da.Fill(dsExport);
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw =
new System.Web.UI.HtmlTextWriter(tw);
DataGrid dgGrid = new DataGrid();
dgGrid.DataSource = dsExport;
// //Report Header
hw.WriteLine("" +
"Report for the Employee Information: " +
"");
//hw.WriteLine(" ");
//// Response.AddHeader("emp info", attachment);
// // Get the HTML for the control.
dgGrid.HeaderStyle.Font.Bold = true;
dgGrid.DataBind();
dgGrid.RenderControl(hw);
// // Write the HTML back to the browser.
Response.ContentType = "application/msword";
this.EnableViewState = false;
Response.Write(tw.ToString());
Response.End();
}
|
|
|
|
|
let me know the given really helps u or not?
don't forget to reply
|
|
|
|
|
Hi,
I hope, what you have given is correct. Can you please explain me or refer a article for this to understand.
Because I am very new to this. Please help me. Thanks
Regards,
Jay
|
|
|
|
|
hi jay
first u show me the coding u have done
|
|
|
|
|
Hi,
I dont know, where to start with. Because,
1. I neeed to create aroud 10 Table format information, which may be created in 6 web pages (aspx) NOT A SINGLE Web page. If I combine everything in one page, the page length is too long.
2. I wish to combine the all the page's output and WRITE in a single WORD file.
3. The WORD file has contains some output fron WebPage and also some Sataic contents like NOTE,Company address, etc.
4. what is word_Click in your code?? Whether after clicking the button, then only the web page is displayed and word file is wrote?
Regards,
Jay
|
|
|
|
|
word_click is just list button_click.......ok
here button text&id is word
|
|
|
|
|
Hi,
I have got the below error in the following line
GridView1.RenderControl(hw);
Http Exception:
Control 'ctl00_ContentPlaceHolder1_GridView1' of type 'GridView' must be placed inside a form tag with runat=server.
Regards,
Jay
|
|
|
|
|
as an example take a sample grid and populate with data from database and then press button
here text and id of button is word
protected void word_Click(object sender, EventArgs e)
{
//string attachment = "attachment; filename=f.xls";
SqlDataAdapter da = new SqlDataAdapter("select * from empdata", cn);
DataSet dsExport = new DataSet();
da.Fill(dsExport);
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw =
new System.Web.UI.HtmlTextWriter(tw);
//DataGrid dgGrid = new DataGrid();
//dgGrid.DataSource = dsExport;
DataGrid1.DataSource = dsExport;
// //Report Header
hw.WriteLine("" +
"Report for the Employee Information: " +
"");
//hw.WriteLine(" ");
//// Response.AddHeader("emp info", attachment);
// // Get the HTML for the control.
//dgGrid.HeaderStyle.Font.Bold = true;
//dgGrid.DataBind();
//dgGrid.RenderControl(hw);
DataGrid1.HeaderStyle.Font.Bold = true;
DataGrid1.DataBind();
DataGrid1.RenderControl(hw);
// // Write the HTML back to the browser.
Response.ContentType = "application/msword";
this.EnableViewState = false;
Response.Write(tw.ToString());
Response.End();
}
|
|
|
|
|
it is working fine for me i tested again
ok
bye
best of luck
|
|
|
|
|
Hi,
Thanks for your guidance. I am working on this now. Hopefully it works for me also.
Regards,
Jay
|
|
|
|
|
Hi,
In order to avoid the above said error, I have addded the below code in my code behind. Now it works fine. THANKS
public override void VerifyRenderingInServerForm(Control control)
{
}
Regards,
Jay
|
|
|
|
|
Hi all
I am display XML data in a datagrid
-----------------------------------------------
Dim Products = New DataSet
Products.ReadXml(MapPath("Products.xml"))
Datagrid1.DataSource = Products
Datagrid1.DataBind()
-----------------------------------------------
In the xml i have a colomn like "Price"
I want to calculate the total Price in the datagrid row and display into a label
Can any one give me an idea
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
just loop thru the column from the dataset and sum it
price=0
for(int i=0;i<products.tables[0].rows.count;i++)
price+=convert.todouble(products.tables[0].rows[i]["price"]);
<div="" class="ForumSig">Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|