|
If you were using fully automated Forms Authentication (which I've been playing with all night), you can use HttpContext.Current.User.Identity.Name to get the currently logged in User ID.
It might work in your case too.
If not then can you use FormsAuthentication.GetAuthCookie ?
Paul
|
|
|
|
|
I moved my application from my machine to the test server this morning and have run into an error reportable in the web.config file. I have been looking for a solution to this error but have come up with nothing. Here is the error message:
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
As always I appreciate everyone’s help.
Jason W.
|
|
|
|
|
Jason Weibel wrote:
As always I appreciate everyone’s help.
Your post is a bit confusing, but did you replace <customErrors mode="RemoteOnly" /> with <customErrors mode="Off" /> ?
If you did, then the next step is to ensure that in IIS the folder the web.config file is in is specified as an IIS Application. If it is, then I do not know what your problem is
|
|
|
|
|
Are these settings case sensitive?
I think they are...
I am pretty sure that I used the word 'off' once instead of 'Off' and got an error back..
|
|
|
|
|
Figured it out, Thanks for the help.
Jason W.
|
|
|
|
|
Jason Weibel wrote:
Figured it out
Mind sharing what the problem was?
|
|
|
|
|
Ray Cassick wrote:
Are these settings case sensitive?
Oh yes most definitely. Remeber web.config is an XML file, so it must follow all the rules of XML. Case sensitive, close elements, quote attributes, one root element, children cannot span parents etc. etc.
|
|
|
|
|
I have an HTML newsletter, which also has a txt only version. I am looking for some way of parsing out the links from the HTML version using an ASP function, and including them in the text only version.
So instead of:
visit this great site,
you'd get something like:
Visit this great site (www.codeproject.com)
Unfortunately, I only have WSH 5.0 - so no regular expressions that I've tried seem to work. Any ideas?
|
|
|
|
|
Hi folks:
Im trying to make some .pdf files visible to users by using asp.net pages.Since it's sensitive i use a dll to bring the pdf from a non web older to a web folder at runtime if the user has access permission.Now the funny part is that everything works fine except that, the client system keeps asking him everytime the program he needs to use to open pdf files.But if i open the same pdf file from the desktop then it just opens with adobe acrobat.I did the registration of the file type both in my webserver and also in client,s machine.
So then why this peculiar behaviour when the pdf file is being opened in a web-page??
Any help is MORE THAN WELCOME.
Regards
Pradhip.S
Regards
Pradhip.S
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
Pradhip wrote:
I did the registration of the file type both in my webserver and also in client,s machine.
I think you will have to register pdf as MIME type on the server, I'm not sure how though, it comes from a memory from a few years back
Hope it works
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
HI , does one do this like a stylesheet, and how?
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
I have about 30 pages that are identical except for minor things. Here's the scenarion:
A person selects multiple recipients for a message, let's say they pick COLLECT1 and COLLECT2. I want to send a different message to COLLECT1 than COLLECT2 and include the information that the "user" has provided. The code for the two pages for gaining the email address and sending the email is indentical.
There are no errors when the user submitts the request, but the email only reaches whoever was chosen first on the list. Now, the recordset is set to nothing and the mail object is set to nothing at the end of each mailing. The only thing I don't know how to do is make the "email" object from the following code go away. I mean, if I go to the page of the second possible choice, COLLECT2, and change the "email" to "email2", then it works. I need to know how to make the "email" object go away at the end of each form so I don't have to go throgh all my pages, renaming the "email" object 1, 2, 3, 4 and so on. Here's the code:
SQLGETEMAIL = "SELECT email FROM DSAUsers WHERE profile = 'APLINEP'"
SET RS = MyConn.Execute(SQLGETEMAIL)
Do until RS.EOF = True
email = email & RS("email") & ";"
RS.movenext
loop
' Get rid of the final ;
If email <> "" Then
email = Left(email, Len(email) - 1)
End If
#######
Then I use CDONTS to send the mail...now, how do I remove any trace of a page being processed so the next one looks like the first? Does this make sense?
|
|
|
|
|
Hi all
I'm passing a hex "number" as a string into a javascript function. Now that works fine. 000000001 stays 000000001. But as soon as I pass the variable again to the next function, it converts it to an integer ie 000000001 becomes 1. How do I stop this from happening?
Cheers
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
Had to do some nightmare escaping but it works now
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
This is the best forum system I ever seen. How can I find information about it, how to install it in my site, etc? Don't say it's CP's and not available...
Rodolfo Lima
|
|
|
|
|
Have you seen the forum on http://www.asp.net[^]? It's pretty cool, and you can download all the source code and tweak it to your heart's content. There are just a few minor tweaks that you have to do to get it working, but I've done it, and I like it.
|
|
|
|
|
RodLima wrote:
can I find information about it, how to install it in my site, etc? Don't say it's CP's and not available...
Check out David Wulff's fantastic forums based on the CP forum code.
|
|
|
|
|
Hey all -
I wanted to nail down a couple of things.
First: if I have many *.aspx files in a single project, since there is only one Assembly associated with it, then if I change just one *.aspx file, the other pages (and everything else in the project) have to be compiled as well.
Second: I created an *.aspx file with ASP Matrix. This file runs perfectly (there is some token script inside just to make sure it's a full ASP.NET page) but I don't see a DLL file associated with it in the folder. Where is the assembly associated with a standalone *.aspx file?
Thanks in advance,
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
First: As far as I know. Just click build/rebuild in VS.NET
Second: ASP Matrix does not use codebehind like VS.NET does. This is one of the only reasons to continue to use VS.NET vs. the free ASP Matrix. The other reason being intelitype.
|
|
|
|
|
afronaut wrote:
Where is the assembly associated with a standalone *.aspx file?
But this is what I really want to know...
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
Hi,all,
About the animal's simulation project, i have another problem to
ask. That is,Whether there is any one who can provide a source code, which can be used for generating a specail terrai manually. Of cause 3D is best, but at first step if a 2D contour map can be displayed, that is enough.
thanks a lot!!!
wang
|
|
|
|
|
wangnanjing wrote:
About the animal's simulation project, i have another problem to
ask. That is,Whether there is any one who can provide a source code, which can be used for generating a specail terrai manually. Of cause 3D is best, but at first step if a 2D contour map can be displayed, that is enough.
This is the web develpment forum. Your question is totally unrelated. I suggest you try the Terranium game forums instead, and have a look at the numerous code samples doing exactly what you are try to do.
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
hi,leppie:
can you tell me Terranium game forums's website?
Sorry for my disturbing again.
wang
wang
|
|
|
|
|
www.gotdotnet.com
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|