|
"My question is: If I Disable the Trace, is the "IsEnabled" test code and the Trace.Write/Warn code included in the compiled version of the page ? If it is, does it impact much on performance ? Does anyone benchmarked a page with trace code and trace disabled ?"
The IsEnabled test and the Trace.Write code will be in compiled version of the page. But it won't affect performance that much. I only tested writing trace messages to a file, you can easily write over 20000 messages by multiple threads within a second.
|
|
|
|
|
Anonymously wrote:
by multiple threads within a second
How many ? I´m asking becuase my system have a extremly high access per second rate.
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
I've gone sending to outer space, to find another race
|
|
|
|
|
i have checkboxes which may return multiple results:
Decision Maker
Buyer&
Advisor
Also in my DB, there is a field for each with a yes/no value depending on if box is checked or not.
how do i enter the values into the fields in the DB as Request("Role") returns multiple values, each separated by a comma so the following (for example) cannot be used.
if Request("Role") = "Q4C2" Then
RS("Buyer") = True
end if
thank you!
|
|
|
|
|
Try something like this...
Dim MyArray
' pretend Role equals "1,0,1,0"
MyArray = Split(Request("Role"), ",")
For x = 0 To (UBound(MyArray)-1)
' update each record in recordset here
'
' i.e.; RS("Buyer") = CInt(MyArray(x))
' RS.MoveNext
'
' ...
Next
Jeremy Falcon
Imputek
<nobr>"In fact it is quite simple, men and women both only want one thing - what they can't have!" - phykell
|
|
|
|
|
in my database i have a yes/No checkbox. the asp code in relation to this is 2 radio buttons, the values for both are "yes" and "no". How do i code so teh checkbox in the database is checked if "yes" and left unchecked if "no"?
thank you!
|
|
|
|
|
Set their values to 1 for yes and 0 for no. In JScript use parseInt() to convert it to an integer and in VBScript use CInt() . Store the result in the database.
Jeremy Falcon
Imputek
<nobr>"In fact it is quite simple, men and women both only want one thing - what they can't have!" - phykell
|
|
|
|
|
mcm wrote:
How do i code so teh checkbox in the database is checked if "yes" and left unchecked if "no"?
Not sure if Jeremy answered your question as I think you are asking for how to do it the other way, right?
Basically when you pull the yes/no value from the database you do something like the following in your ASP page:
<input type="checkbox" name="chkYesNo" <%If rs("field") = "yes" Then%>checked="true"<%end if%> />
Inlining ASP is not a good idea, but that is one way to do it. You could also use JavaScript with the OnLoad event.
|
|
|
|
|
Uf.. I'm really tired from VS.NET, can't find anything there and my old projects are not working in .NET
I have several projects I did using InterDev from VS6. Firstly couldn't open them in .NET so re-created. Now it just not working well, I guess I need to figure out settings, but can't find anything yet.
When I navigate to some pages, the browser doesn't show them, but continue to download, looks like there is an error or something, although I'm sure there is no error, since same code is working well on my web site and worked with InterDev fine. If I'll cancel loading the page, I'm not able to use IIS until i'll restart it. Can someone tell me why this happen and how to fix this?
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
At least found now where the problem is. Maybe someone knows how to fix it?
I have such line in the ASP page:
set fso = Server.CreateObject("Scripting.FileSystemObject")
set dir = fso.GetFolder(strCurDir)
So exactly on this line IIS stops working. I got no error, nothing. Just IIS stops working at all. Parameter is correct, I gave even Full Access to Internet Guest Account, so security is not a problem... But what?
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
|
I have the following snippet of code, but I do not desire the horizontal scroll bars to be there...the text word wraps fine and doesn't need them...is there a way to hide H scroll bars...?
<div style="position: relative; width: 280px; height: 80px; overflow: scroll">
This is some text
</div
I think I have accomplished this before using a word wrap CSS attribute or something, but I cannot remember if it is available how I did this...?
Any ideas...? Thanks!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey wrote:
I think I have accomplished this before using a word wrap CSS attribute or something, but I cannot remember if it is available how I did this...?
It is a bit odd but you need to set overflow to auto not scroll .
|
|
|
|
|
Thanks!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I just finished an ASP.NET application and it runs fine on my dev machine.
However, when I deploy it to the servers (clustered), I get the error "The View State is invalid for this page and might be corrupted". The crazy thing is that I set EnableViewState to "false" .
Also, I made sure the MachineKey and ValidationKey values are the same across all nodes in the cluster.
Any hints?
|
|
|
|
|
Just for future reference, really. I don't see much regarding perl out here, but that doesn't necessarily mean folks aren't using it.
Also, does anyone know good perl discussion boards similar to code-project?
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
I'm looking for the best way to restrict access to files, such as word docs, pdf, under an ASP.NET application. I use forms based authentication to allow access and I've set the IIS file mappings for my application so htm and asp pages use the ASP.NET dll. Everything works fine with these but doc and pdf files still get no security.
I was trying to implement an httpmodule to handle the onbeginrequest and check if the user has been authenticated but at that point in the process the user object has not been created yet. Anyone have an idea how to do this?
|
|
|
|
|
Mark Nischalke wrote:
I'm looking for the best way to restrict access to files, such as word docs, pdf,
Best way is to do it per folder, not per file (so copy the PDFs and DOCs into the secured folder(s).)
In IIS go to the Directory Security tab of a virtual dir. properties. Then uncheck Anonymous access and check Basic Authentication. When you access that dir from an account not on the servers domain it will pop-up a dialog asking for a user name and password.
The problem with this though is you need a Windows account for users to use, though I think you can tap into it and link it through to a database rather than Active Directory.
|
|
|
|
|
I've used this in other projects but for this it won't work. These fles are in secured folders. The user had to pass through the forms authentication to view the aspx and html pages under it which contain links to the docs and pdfs. It is to much to ask (I have the scares) them to authenticate again to view a doc or pdf. As it is now navigating to the main page routes them through the authentication, just as it should. navigating the the doc directly does not. I want to check the authentication status, if not present redirect them tot he login page.
|
|
|
|
|
This problem perhaps is an impossible-to-answer qustion!
Well, I've uploded my ASP.NET code on Brinkster to ty it.... but it doesn't work!
I get this error message when I enter the page:
<br />
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. <br />
<br />
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.<br />
<br />
Source Error: <br />
<br />
<br />
Line 1: [configuration]<br />
Line 2: [system.web]<br />
Line 3: [authentication mode="Forms"]<br />
Line 4: [forms loginUrl="LoginPage.aspx"]<br />
Line 5: [credentials passwordFormat="Clear"]<br />
<br />
I've done a "Log in" test page with forms authentication, but it doesn't work for me on Brinkster. Can Brinkster's server be the leak?
PS. This is the address: http://www21.brinkster.com/suza/[^]
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
This error can be caused by a virtual directory not being configured as an application in IIS.
Another irritating thing about ASP.NET. With ASP you just copied the file and it ran, with ASP.NET you have to maintain the integrity of the whole assembly and a whole lot of other setup tasks.
Basically this is what you need to do: You need to get Brinkster to make the IIS Virtual Directory in which your web.config file lies an Application. This can be done in IIS itself (right click virtual dir, click Create Application.)
If Brinkster won't do this for you (which they probably won't) then you need to locate your web.config file in an application folder, not just a normal folder. Bottom line is web.config must be in a virtual dir which is an IIS Application. Very bizarre but that is the deal unfortunatley.
|
|
|
|
|
Paul Watson wrote:
If Brinkster won't do this for you (which they probably won't)
Brinkster fixed this problem for me, about 15 minutes after I sent the mail. They're pretty damned approachable to be honest, don't underestimate them.
Paul
|
|
|
|
|
Paul Riley wrote:
don't underestimate them.
Well then I stand corrected, and pleased to be so. I really did not expect a free hosting service to be that responsive. GeoCities would just laugh at you and even some paid-for hosters would take days to do it and charge you for the work done (they charge by the hour of course, even though it takes only 5 minutes to do.)
|
|
|
|
|
Wohoo!!
Then I just have to e-mail them right now and tell them!
Thank you!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
This is my response from Brinkster:
<br />
Hello,<br />
Unfortunately, some of the General and General SE accounts have more difficulty than others. There are differences in the way the General solutions are configured than the Premium X4, but no difference between the General and General SE.<br />
<br />
The Premium x4 accounts do not experience this difficulty.<br />
<br />
We have been working with Microsoft for a solution this, but this has not been <br />
resolved at this time.<br />
<br />
All we can recommend at this time is that you follow the FAQ's at http://www.brinkster.com/GeneraldotNETFAQs.asp as well as the following steps;<br />
<br />
VS.NET UPLOADS<br />
You can upload to your account via Visual Studio.Net by doing the following:<br />
<br />
1- Load the Visual Studio start page (at Visual Studio start-up)<br />
2- In the menu to left, click "Web Hosting"<br />
3- Then, click the "Additional Providers" tab<br />
4- Then, click "Upload directly to your account"<br />
5- Finally, enter your Brinkster Account User Name and Account Password<br />
<br />
Note that if you are connecting to the Internet via a proxy server or firewall configuration, you may experience problems uploading via Visual Studio .Net. This is beyond our control and you or your ISP will need to configure your firewall or proxy server settings appropriately in order for you to use the feature.<br />
<br />
<br />
VS .NET UPLOAD FILE STRUCTURE ISSUES:<br />
The upload feature from within Visual Studio uploads projects the way that Microsoft creates them (each in to it's own folder). This is by default as Microsoft has set it up, and not able to be changed by us.<br />
<br />
To remedy this issue you have two choices:<br />
1. You can use the Visual Studio .NET upload facility, then create a default.htm (or .aspx) file that simply redirects visitors who type in just your domain name to the exact file you want them to go to (www.YourDomain.com/YourProject/default.htm).<br />
<br />
2. You can use FTP and put the files and folders in exactly the places you want them.<br />
<br />
<br />
Because the General and General SE accounts are free or low cost alternatives to Premium hosting, they are more restrictive. Such programs could not exist for developers if there were fewer restriction due to the costs involved.<br />
<br />
If you are unable to connect to a General or General SE account with Visual Studio .NET; In the short term the only alternative is to open or upgrade to a Premium account where these issues do not exist. In the long term it is an issue that we continue to work toward a solution, but at the moment remains unresolved.<br />
grrr!!!!
I have to find another FREE ASP.NET hosting somewhere I think!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Wooooooohooooo!!!!!!!
I found a FREE .NET hosting site and my "Log in" ASP.NET code worked as it should do!!!!!!!!!!!!!!!!!!!!!!
I AM SOOOOO HAPPY NOW!!!
Brinkster you suck!!!!
here is the URL to that HOSTING service: www.dotnetplayground.com[^]
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|