|
|
Hi,
I cannot open the site in number of pages which is published in my local iis.
When i try to access the link above 10 or 12 pages it show page cannot found error. When refresh the already opened pages, same error.
Whant is the issue?
Thankyou
YPKI
|
|
|
|
|
yesu prakash wrote: When i try to access the link above 10 or 12 pages it show page cannot found error. When refresh the already opened pages, same error.
I didn't get you. Please explain in details.
Thanks
|
|
|
|
|
I published a site in my local IIS, when i access the site in more than 10 or 12 browsers at a time, it cannot acces it. It show page cannot find page. If i close 2 or 4 pages, then again i can open the site in 2 or 4 browsers.Upto 10 or 12 browsers it is ok.
After getting the error, when i refresh any already opened browser, it show page cannot find error
|
|
|
|
|
Unless you are running a Windows Server OS your concurrent connections are limited. There is a maximum number of concurrent requests that your workstation IIS will serve.
If you want more concurrent connections you may have to move your application to a server.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
there some another sites are published in the same IIS, they all working fine
|
|
|
|
|
Using Forms Authentication and locking down the path so you need to be authenticated to access the pages / data.
I am trying to use the current authenticated user credentials in order to process a web request within the .aspx page that the user has navigated to. Code as below:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
req.Credentials = CredentialCache.DefaultCredentials;
WebResponse res = req.GetResponse();
NOTE: the uri is valid.
The response is a redirect to the login page (bad credentials redirect to login page) and not the requested data provided by the web request.
I am struggling to find what I need to do in order for this request to be processed as though it was the current authenticated user.
Any advice is most appreciated.
Thanks in advance.
Ant.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
Forms Authentication works (by default) by storing an encrypted ticket as a cookie upon login, which the authentication module then reads and interprets to determine the currently logged in user.
For the situation you describe to work (if I am not misunderstanding you), the uri that forms your HttpWebRequest needs to either be in the same web application (which would be very unlikely) or it would be to a web application that is configured to use forms authentication with the same machineKey as the calling application. Configuring multiple applications with a common machineKey in web.config is one way to achieve single sign-on, allowing the user to have one login that passes through to other applications. You can read the following article, under "Web Farm Deployment Considerations" to see how:
http://msdn.microsoft.com/en-us/library/ms998288.aspx[^]
There is also a bunch of blog articles describing single signon you can find by googling "asp.net forms authentication single sign-on"
Then from the calling application it would be a matter of adding the forms authentication cookie that has already been created (again through the successful submission of a user login form) to the request object's CookieContainer[^] prior to making the call. If the target application is configured correctly, it will automatically interpret the cookie and the forms authentication credentials to determine the user.
|
|
|
|
|
Many thanks Mike, getting the cookie and adding it to the request CookieContainer is exactly what I wanted.
Just for others to reference I have included my code.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
HttpCookie cookie = HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
Cookie authenticationCookie = new Cookie(FormsAuthentication.FormsCookieName,
cookie.Value,
cookie.Path,
HttpContext.Current.Request.Url.Authority);
req.CookieContainer = new CookieContainer();
req.CookieContainer.Add(authenticationCookie);
WebResponse res = req.GetResponse();
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)
|
|
|
|
|
I'm glad, Ant. Nice code snippet too.
|
|
|
|
|
|
Hi,
if you have an ASP.NET button you can register for the click-event of the button. Within the event handler use Response.Redirect to navigate to the other page.
|
|
|
|
|
if the application is xbap application which has been published and has its url . Can it be done the same way . If not then how?
|
|
|
|
|
So is the calling app an xbap app or the is it the page you want to navigate to?
If you want to navigate to an xbap app it should work without problems (only in IE). If you want to do this in an xbap app you should post the question in the XAML/WPF forum, maybe someone would know this over there.
|
|
|
|
|
This [^]link explains quite a few methods to do this.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Im using this code to get and display FullNAme from Active Directory.
It works fine on my machine but when i upload it on the Server It give me following error
I try to change winNT into LDAP but no use on SERVER...
////////////
Error: System.Runtime.InteropServices.COMException (0x80072020): An operations error occurred. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at _Default.GetFullName(String strLogin) in d:\inetpub\En.ASPETAR.Rel\QCD-Suggestions\Default.aspx.cs:line 60
//////////
protected void Page_Load(object sender, EventArgs e)
{
this.lblDOS.Text = DateTime.Now.ToShortDateString();
tbName.Text = GetFullName(Request.ServerVariables["LOGON_USER"].ToString());
}
private string GetFullName(string strLogin)
{
string str = "";
// Parse the string to check if domain name is present.
int idx = strLogin.IndexOf('\\');
if (idx == -1)
{
idx = strLogin.IndexOf('@');
}
string strDomain;
string strName;
if (idx != -1)
{
strDomain = strLogin.Substring(0, idx);
strName = strLogin.Substring(idx + 1);
}
else
{
strDomain = "MYDOMAIN NAME";
strName = strLogin;
}
DirectoryEntry obDirEntry = null;
try
{
obDirEntry = new DirectoryEntry("WinNT://" + strDomain + "/"+ strName);
System.DirectoryServices.PropertyCollection coll = obDirEntry.Properties;
object obVal = coll["FullName"].Value;
str = obVal.ToString();
return str;
}
catch (Exception ex)
{
str = "";
return "Error: " + ex;
}
}
sheeba
|
|
|
|
|
What exception are you getting ?
And how does it related with ASP.NET ?
|
|
|
|
|
Error: System.Runtime.InteropServices.COMException (0x80072020): An operations error occurred. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at _Default.GetFullName(String strLogin) in d:\inetpub\En.ASPETAR.Rel\QCD-Suggestions\Default.aspx.cs:line 60
sheeba
|
|
|
|
|
This is the Stack Trace. There should be an error message
|
|
|
|
|
i want to create a floating form in my web forms.
a floating form with out windows frame and with close button and it should be movable... im looking for javascript code that use it in asp.net...
help me please...
thanks
M.Alizadeh
|
|
|
|
|
If it doesn't have a frame, javascript can't help. You'd be creating a floating div.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
tel me please how i can use a floating div...
i dont know about this
M.Alizadeh
|
|
|
|
|
|
I need to perform a custom paging like
"First" "2" "3" "Last"
but not able to do it
my grid is binding on a button click.
pls help
|
|
|
|
|
I don't believe the gridview suports that, you'd have to write your own paging control.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|