Friday, November 18, 2005

ASP.NET Questions

1) How security is implemented in asp.net
ASP.NET implement security in three ways
a- Forms-based security
in this case you set the IIS authentication system to anonymous access to enable the ASP.NET to validate authentication itself by checking if the user name & Password is equivalent to the same info which is stored anyhow (XML, Database, ...)
b- Windows-based security
according to this option any user access the site must have a registered windows account and a dedicated permissions
Passport-based security
this is a centric authentication service in which one login could auto authenticate the user for many sites where is no need to store the user names & passwords into each site


2) In my website for eg. it has around 100 aspx. In that I want 20 aspx files should be available to the users only if they are logged in. How can I achieve this with web.config file.


all what you have to do is to creat a folder then move your required files into it then configur the web.config as follows :





// or you can write your pages names instead of folder name








What do you meant by default view

it is the auto generated default view of the table in the dataset , when dealing with any table in a dataset, .NET makes a view of that table to can communicate with it so it is the default one


Difference between stored procedure and stored functions

they all do the same functions except the stored functions can return a table and can be implemented into a select statement like " select myFunction(someParam)"


5) I have a file called a.aspx which has some textboxes. I want to post the values to b.aspx without using response.redirect. How can I do this.

You can use session variables to store this a.aspx textBoxs Like session ["myVar"]=TextBox1.Txt

Different between datagrid and datalist

the datagrid is designed to show a table-like data to the user but the datalist is designed to show a row-like data

No comments: