|
It could be anything, but you can bet it's got to do with the browser or the OS (most likely the browser). Install a different browser on the box, and see if that one works any better. If it does, the browser configuration is somehow borked up.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Hi,
I have scenario in which I want to execute OnClientClick after OnClick. The default behavior is vice-versa. How can I achieve same.
Please help. Thanks.
// ♫ 99 little bugs in the code,
// 99 bugs in the code
// We fix a bug, compile it again
// 101 little bugs in the code ♫
|
|
|
|
|
|
|
I'm trying to capture the username (and domain) of the user accessing the web application (web server on the same domain for starters). I have modifed the IIS settings to use Windows authentication and added stuff to web.config and use the following code below to capture this information - and it works as long as the web server is the localhost i.e it works only if the web app is accessed via a browser on the web server. Otherwise it returns a null string, what do I need to do? (currently buidling on .NET 2.0)
Snippet of code in VB.NET (objGenericIdentity.Name contains null string when web app is accessed outside of web server):
Dim formsAuthTicket As FormsAuthenticationTicket
Dim httpCook As HttpCookie
Dim objGenericIdentity As GenericIdentity
Dim objMyAppPrincipal As securityPrincipal
Dim strRoles As String()
httpCook = Context.Request.Cookies.Get("authCookie")
formsAuthTicket = FormsAuthentication.Decrypt(httpCook.Value)
objGenericIdentity = New GenericIdentity(formsAuthTicket.Name)
strRoles = formsAuthTicket.UserData.Split("|")
objMyAppPrincipal = New securityPrincipal(objGenericIdentity, strRoles)
HttpContext.Current.User = objMyAppPrincipal
web.config contains this:
authentication mode="Windows"
identity impersonate="true"
(I'm not using anything related to formsauthentication in the web.config file, do I need to?).
And finally, what would I need to do to get this info when web app is accessed from a different domain?
arvind
|
|
|
|
|
|
Hi, i want to change my url by url rewritting. In the root of my application a Group name folder exists. in that folder user page exists..
after login url looks like that..
www.abc.com/Group/MyProfile.aspx
but i want to change like that
www.abc.com/Myusername/MyProfile.aspx
means i want to change Group folder name with my UserName.
can we don this with url rewritting or anything else we have to do .
Thanks.
|
|
|
|
|
This may help[^]
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
|
For an ASP C# website I made, I have user authentication using the Membership framework with SQL Server as the back end. The only complaint so far is that after a certain amount of time, they get automatically logged out. Is there anything I can do to make sure that users will stay permanently logged in unless they manually logout?
Edit: The webserver is IIS 7.5. I suppose this could just as easily be an IIS question.
|
|
|
|
|
The default timeout for session is 20 minutes. If the user takes no action, i.e. refreshing the page or navigating to another one, the server can't tell if they closed their browser, gone somewhere else, or died. You can adjust the timeout via the web.config file but you will still be left with the same problem, just at a later time
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: You can adjust the timeout via the web.config file but you will still be left with the same problem, just at a later time
I figure setting it to 122 years and 164 days should be sufficient.
Driven to the ARMs by x86.
|
|
|
|
|
Add 12 hours just to sure
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
I've a web application in ASP. I want when a user clicks on button, the data on a particular webpage is saved in a PDF file and the user can append the data in the pdf file.
Any idea?
Thanks
|
|
|
|
|
Legacy ASP, or ASP.Net? You have to find a 3rd-party library to do what you want.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I actually did just that at one point. I found that the free libraries were crap (didn't render the page as expected). The way I got around it was to use a Windows Forms WebBrowser to render the page (on the server side), render that control to a bitmap (WebBrowser.DrawToBitmap), save that bitmap as a PNG, embed that PNG into a PDF (the free libraries seem to be capable of at least this), then return that PNG to the browser as raw byte data (this will help you figure that out). I also remember having to do some custom HTML parsing to print each page neatly. It's tricky, but can be done (took me 2-4 days IIRC). Google for anything above you don't know how to do (e.g., you can google for free PDF libraries).
Driven to the ARMs by x86.
|
|
|
|
|
I want to convert xml file to pdf using C#.Can u please help me to do this
|
|
|
|
|
|
Hi,
Increase And Decrease Width of GridView Column on Mouse Darging , please suggest me better way
Regards,
Vishnu.
|
|
|
|
|
hi,
vishnukamath wrote: Increase And Decrease Width of GridView Column on Mouse Darging
You can use ExtJs.net.It will solve your issue, check the demo
http://examples.ext.net/[^]
|
|
|
|
|
To assign width for all column using ItemStyle-Width property with in Item template
|
|
|
|
|
Hi All, I am wondering how to validate date using regular expression and not allowing any future date if the user wants to put it in anyway.
thanks,
|
|
|
|
|
Hi,
no, it's not possible with regular expression, regular expression can only validate patterns, you can use compare validator for this purpose or use .NET function DateTime.Now to acquire todays date, then compare it programmatically with the date from user's input.
Regular expression for date is
(?x)(? [1-9]|1[0-2])(/?)(? [1-9]|[12][0-9]|3[01])(\1)\d{4}\d/\d/\d{4}
|
|
|
|
|
Thank you Iqbal bhi, I will get the user input and then compare with present date in the back end.
thanks for the date format.
|
|
|
|
|
thanks for your reply, I know it can be done using back end Csharp code. But how do I display message to user that something is wrong.
|
|
|
|
|
Just to add to Shahriar Iqbal Chowdhury's answer, you can use the regex validator to do an "idiot check" Client side and use dateTime.TryParse[^] to check server side. There are several attempts to do it here[^] without the regex using JavaScript instead.
For the regex pattern, I've always found http://regexlib.com[^] useful, it also gives a summary of how well well the regex matches etc.
|
|
|
|