Thursday, March 29, 2012
performance of release vs debug build
Up until now I have been shipping debug builds of my asp.net
application and including the pdb files too, even into production
systems, primarily because it gives us proper stack traces with line
numbers in the event of an exception. I haven't been aware of any
stability, memory or performance problems with the application, even
for sites that have been running 24/7 for months with worker process
recycling disabled.
is there any reason I shouldn't continue doing this indefinitely and
only switch to release builds if a customer needs a really highly
tuned system, or are there some gotchas with debug builds?
a related question - any general guidelines as to how much faster C#
code performs in release build? as for most asp.net apps I would
anticipate that the system load of the application as a whole is
probably 50% IIS/franework, 50% database and only a miniscule amount
for my processing.
cheers
AndyHi,
See:
http://weblogs.asp.net/scottgu/arch...0_-enabled.aspx
Note also the followup link in the post.
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
<ajfish@.blueyonder.co.uk> wrote in message
news:1178872287.825311.58920@.h2g2000hsg.googlegroups.com...
> Hi,
> Up until now I have been shipping debug builds of my asp.net
> application and including the pdb files too, even into production
> systems, primarily because it gives us proper stack traces with line
> numbers in the event of an exception. I haven't been aware of any
> stability, memory or performance problems with the application, even
> for sites that have been running 24/7 for months with worker process
> recycling disabled.
> is there any reason I shouldn't continue doing this indefinitely and
> only switch to release builds if a customer needs a really highly
> tuned system, or are there some gotchas with debug builds?
> a related question - any general guidelines as to how much faster C#
> code performs in release build? as for most asp.net apps I would
> anticipate that the system load of the application as a whole is
> probably 50% IIS/franework, 50% database and only a miniscule amount
> for my processing.
> cheers
> Andy
>
Thanks very much for these links
it seems to me that we can continue to use a debug build for the code
in the application without too much penalty, but should definitely use
debug=false in the web.config
On 11 May, 10:08, "Teemu Keiski" <jot...@.aspalliance.com> wrote:
> Hi,
> See:[url]http://weblogs.asp.net/scottgu/archive/2006/04/11/Don_1920_t-run-prod...[/ur
l]
> Note also the followup link in the post.
> --
> Teemu Keiski
> AspInsider, ASP.NET MVPhttp://blogs.aspadvice.com/jotekehttp://teemukeiski
.net
> <ajf...@.blueyonder.co.uk> wrote in message
> news:1178872287.825311.58920@.h2g2000hsg.googlegroups.com...
>
>
>
>
>
>
>
> - Show quoted text -
Yup, that's what Scott says to be a sort of "compromise"
Teemu
<ajfish@.blueyonder.co.uk> wrote in message
news:1178876244.123360.92750@.e65g2000hsc.googlegroups.com...
> Thanks very much for these links
> it seems to me that we can continue to use a debug build for the code
> in the application without too much penalty, but should definitely use
> debug=false in the web.config
> On 11 May, 10:08, "Teemu Keiski" <jot...@.aspalliance.com> wrote:
>
Saturday, March 24, 2012
Permission problem
I am trying to download the PDF files from my webserver using ASP.Net.
All my files are stored at F Drive on webserver. Like this F:\Main
Folder\Sub Folder\user folder\files\File1.pdf
I am impersonating the domain user account and downloading the file, It
seems the impersonate is got success.
If I gave full control to that user folder, its allowing me to download the
file.
BUT, If I gave read&execute permisson to that folder, its asking me the
windows username and password window for dowload the file.
My client doesn't need that windows checking. we already given the read &
execute permission to that folder, then why its asking the windows user name
and password window?
any idea please.
thanks
balaIs it possible that a temporary file is being created somewhere and that is
demanding greater permissions?
Ken
"Bala" <Bala@.discussions.microsoft.com> wrote in message
news:04A524B8-2287-4659-BDD7-1AFB3A9C48A9@.microsoft.com...
> Hi
> I am trying to download the PDF files from my webserver using ASP.Net.
> All my files are stored at F Drive on webserver. Like this F:\Main
> Folder\Sub Folder\user folder\files\File1.pdf
> I am impersonating the domain user account and downloading the file, It
> seems the impersonate is got success.
> If I gave full control to that user folder, its allowing me to download
> the
> file.
> BUT, If I gave read&execute permisson to that folder, its asking me the
> windows username and password window for dowload the file.
> My client doesn't need that windows checking. we already given the read &
> execute permission to that folder, then why its asking the windows user
> name
> and password window?
> any idea please.
> thanks
> bala
>
seems like good idea, But there is no other way to solve this problem?
Thanks
bala
"Ken Cox [Microsoft MVP]" wrote:
> Is it possible that a temporary file is being created somewhere and that i
s
> demanding greater permissions?
> Ken
> "Bala" <Bala@.discussions.microsoft.com> wrote in message
> news:04A524B8-2287-4659-BDD7-1AFB3A9C48A9@.microsoft.com...
>
>
Permission problem
I am trying to download the PDF files from my webserver using ASP.Net.
All my files are stored at F Drive on webserver. Like this F:\Main
Folder\Sub Folder\user folder\files\File1.pdf
I am impersonating the domain user account and downloading the file, It
seems the impersonate is got success.
If I gave full control to that user folder, its allowing me to download the
file.
BUT, If I gave read&execute permisson to that folder, its asking me the
windows username and password window for dowload the file.
My client doesn't need that windows checking. we already given the read &
execute permission to that folder, then why its asking the windows user name
and password window?
any idea please.
thanks
balaIs it possible that a temporary file is being created somewhere and that is
demanding greater permissions?
Ken
"Bala" <Bala@.discussions.microsoft.com> wrote in message
news:04A524B8-2287-4659-BDD7-1AFB3A9C48A9@.microsoft.com...
> Hi
> I am trying to download the PDF files from my webserver using ASP.Net.
> All my files are stored at F Drive on webserver. Like this F:\Main
> Folder\Sub Folder\user folder\files\File1.pdf
> I am impersonating the domain user account and downloading the file, It
> seems the impersonate is got success.
> If I gave full control to that user folder, its allowing me to download
> the
> file.
> BUT, If I gave read&execute permisson to that folder, its asking me the
> windows username and password window for dowload the file.
> My client doesn't need that windows checking. we already given the read &
> execute permission to that folder, then why its asking the windows user
> name
> and password window?
> any idea please.
> thanks
> bala
seems like good idea, But there is no other way to solve this problem?
Thanks
bala
"Ken Cox [Microsoft MVP]" wrote:
> Is it possible that a temporary file is being created somewhere and that is
> demanding greater permissions?
> Ken
> "Bala" <Bala@.discussions.microsoft.com> wrote in message
> news:04A524B8-2287-4659-BDD7-1AFB3A9C48A9@.microsoft.com...
> > Hi
> > I am trying to download the PDF files from my webserver using ASP.Net.
> > All my files are stored at F Drive on webserver. Like this F:\Main
> > Folder\Sub Folder\user folder\files\File1.pdf
> > I am impersonating the domain user account and downloading the file, It
> > seems the impersonate is got success.
> > If I gave full control to that user folder, its allowing me to download
> > the
> > file.
> > BUT, If I gave read&execute permisson to that folder, its asking me the
> > windows username and password window for dowload the file.
> > My client doesn't need that windows checking. we already given the read &
> > execute permission to that folder, then why its asking the windows user
> > name
> > and password window?
> > any idea please.
> > thanks
> > bala
>
permission problem? Im not sure.
Hi. One of my developers has reported that his backup procedure has stopped working. His backup script basically copies files to a network share. I checked the permission on the network share, and everything was okay. From the web server, I was able to open the network share from run or drive mapping without a problem. I don't know what's going on here. The error message is below:
Summary:
Bring client reports/documentation from drop off location on SERVERNAME
(\\SERVERNAME\PATH\WebSiteUpload) to webserver
(/CorporateWEB/Uploads/)
System.IO.IOException: The specified network name is no longer available.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles()
at ASB.Automation.WebSiteUpload.PerformJob() in C:\ASBDevelopment\ASBAutomation\AsbJobs\Maintenance\WebSiteUpload.cs:line 35
at ASB.Automation.Control.AsbJobRunner.RunJob(String[] args) in C:\ASBDevelopment\ASBAutomation\ASBJobFramework\ASBJobControl\AsbJobRunner.cs:line 94
Have that script display the full path it's trying to reach, then see if you can reach it by logging on the server and putting it in the Start/Run dialog -- if it's reachable it will come up in windows explorer
Permission to access PDF files from ASP.NET
My web app requires to access a PDF document. However it will not open when
I start to access it using Process.Start("fileName"). Although at the task
manager, it says that the Acrobat service has been started by ASPNET. Is
there something I did wrong or have not done? Pls help.
Thanksryu wrote:
> Hi All,
> My web app requires to access a PDF document. However it will not open when
> I start to access it using Process.Start("fileName"). Although at the task
> manager, it says that the Acrobat service has been started by ASPNET. Is
> there something I did wrong or have not done? Pls help.
> Thanks
You want to open a PDF on the *server*??
Process.Start will open only local (that is: local *to the server*)
processes and will open them on the *invisible* desktop of the ASPNET user.
If you want to open that PDF file on the *client*, you need to send
that file to the client:
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.ContentType = "application/pdf";
Response.WriteFile("myLocalFile.pdf");
Response.End();
--
Hans Kesting
Permission to access PDF files from ASP.NET
My web app requires to access a PDF document. However it will not open when
I start to access it using Process.Start("fileName"). Although at the task
manager, it says that the Acrobat service has been started by ASPNET. Is
there something I did wrong or have not done? Pls help.
Thanksryu wrote:
> Hi All,
> My web app requires to access a PDF document. However it will not open whe
n
> I start to access it using Process.Start("fileName"). Although at the task
> manager, it says that the Acrobat service has been started by ASPNET. Is
> there something I did wrong or have not done? Pls help.
> Thanks
>
You want to open a PDF on the *server*'
Process.Start will open only local (that is: local *to the server*)
processes and will open them on the *invisible* desktop of the ASPNET user.
If you want to open that PDF file on the *client*, you need to send
that file to the client:
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.ContentType = "application/pdf";
Response.WriteFile("myLocalFile.pdf");
Response.End();
Hans Kesting
Permissions
folders. What should i do to permit ASP.NET scripts writing, for example, i
n C:\test.txt ?You need to give write (and possibly Change) permissions to the ASPNET
account.
The best way is to do it securely as outline here:
How To Create a Custom Account to Run ASP.NET
http://msdn.microsoft.com/library/e...asp?frame=true
"michael" <michael.1jbh5v@.mail.codecomments.com> wrote in message
news:michael.1jbh5v@.mail.codecomments.com...
> By default, IIS denies ASP.NET scripts to write files on the disc and
> create folders. What should i do to permit ASP.NET scripts writing, for
> example, in C:\test.txt ?
>
> --
> michael
> ---
> Posted via http://www.codecomments.com
> ---
>
Permissions
create folders. What should i do to permit ASP.NET scripts writing, for
example, in C:\test.txt ?
--
michael
----------------------
Posted via http://www.codecomments.com
----------------------You need to give write (and possibly Change) permissions to the ASPNET
account.
The best way is to do it securely as outline here:
How To Create a Custom Account to Run ASP.NET
http://msdn.microsoft.com/library/e...asp?frame=true
"michael" <michael.1jbh5v@.mail.codecomments.com> wrote in message
news:michael.1jbh5v@.mail.codecomments.com...
> By default, IIS denies ASP.NET scripts to write files on the disc and
> create folders. What should i do to permit ASP.NET scripts writing, for
> example, in C:\test.txt ?
>
> --
> michael
> ----------------------
> Posted via http://www.codecomments.com
> ----------------------
Wednesday, March 21, 2012
Permissions for website on localhost
s
user control which displays a list of all files in a folder on the client
machine.
When I run the webapp I obviously get an error message saying that the .net
framework wont allow permissions to do such a thing.
Can anyone tell me how I can set permissions on my machine so that I can run
this ?Have you defined the permissions in the IIS website properties?
Thats not the problem.
Its the client. I must set up the .net framework to accept any actions
coming from this URL. It must allow my dll to perform whatever it wants on
the client machine.
It just so happens that its on localhost at the moment.
Start here:
http://msdn.microsoft.com/library/d...esssecurity.asp
I have gone in to the .net configuration manager and set the URL as trusted
but still no joy.
To be honest, I'm not sure if this is even possible--at least, without
extensive work.
ASP.NET code executes on the server, and as such, that is all it has
access to.
In addition, JavaScript is restricted from accessing the file system,
so that rules that out.
The only way I could imagine being able to access the client's file
system is to create an ActiveX control that the clients would have to
download and install, and that code would have to be trusted on the
client machine.
You may be better off to re-evaluate the architecture of your
application--does it really need this functionality? If the answer is
yes, you should probably look into developing a windows forms/smart
client.
What exactly are you trying to do, anyway? Why would a user go to your
website to navigate the files on his local machine?
Permissions for website on localhost
user control which displays a list of all files in a folder on the client
machine.
When I run the webapp I obviously get an error message saying that the .net
framework wont allow permissions to do such a thing.
Can anyone tell me how I can set permissions on my machine so that I can run
this ?Have you defined the permissions in the IIS website properties?
Thats not the problem.
Its the client. I must set up the .net framework to accept any actions
coming from this URL. It must allow my dll to perform whatever it wants on
the client machine.
It just so happens that its on localhost at the moment.
Start here:
http://msdn.microsoft.com/library/d...esssecurity.asp
I have gone in to the .net configuration manager and set the URL as trusted
but still no joy.
To be honest, I'm not sure if this is even possible--at least, without
extensive work.
ASP.NET code executes on the server, and as such, that is all it has
access to.
In addition, JavaScript is restricted from accessing the file system,
so that rules that out.
The only way I could imagine being able to access the client's file
system is to create an ActiveX control that the clients would have to
download and install, and that code would have to be trusted on the
client machine.
You may be better off to re-evaluate the architecture of your
application--does it really need this functionality? If the answer is
yes, you should probably look into developing a windows forms/smart
client.
What exactly are you trying to do, anyway? Why would a user go to your
website to navigate the files on his local machine?
Permissions Help with asp.net saving uploaded files
directory if it doesn't already exist.
This works, unless I try to upload a file to a pre-existing directory. If I
do that, I get this vague error:
Exception has been thrown by the target of an invocation.
From what I can tell, this is maybe a permissions issue?
'aspnet_wp account' has full control over the parent directory and any
directory it makes. The only oddity is that upon first creation of a
directory, I get prompted by the browser to enter my own network
username/pwd.
I'm completely stuck on this and really have no idea what to check for. Is
there anyway to get a more specific error message out of the application
than the one above?
-Darrel> I'm completely stuck on this and really have no idea what to check for. Is
> there anyway to get a more specific error message out of the application
> than the one above?
Aha. I figured that part out:
exc.InnerException.Message
Which gives me a much more specific answer...access denied for the
particular directory I'm trying to save to.
So, what should I check for? What is odd is that my application is just fine
creating the directory and then immediately uploading some files to it. It's
only on subsequent attempts does it get the access deined error.
-Darrel
Permissions issue running .aspx files...
Server cannot access application directory "C:\Inetpub\www". The directory does not exist or is not accessible because of security settings.
Now of course the directory exists, and the permissions were (and remain) set properly for my other .asp files to run, just not the .aspx files I create with WebMatrix. All my googling indicates I have to set the permissions for an ASPNET user, which apparently 2003 doesn't use; NETWORK SERVICES runs stuff, but as that's not a user per se, I don't know how to "give it rights" so I'm at a loss.
I gave full rights (just to test, I set these back after) for the IUSER, IWAM, and IIS_WPG users, and no soup. I also have a user OWS_xxxxxxx_admin which is described as "MIcrosoft SharePoint role 'admin' for web..." but that also didn't do it. Here's why I definitely think it's a rights issue: I gave "Everybody" full rights and then my page loads. Here's the kicker though; I took away "Everybody" and gave just "Doman Users" full rights, and it doesn't work. So the impression I get is that it's trying to use a username to run scripts that doesn't exist in my domain... as if the user was somehow 'lost'.
I've also heard mention of a machine.cfg file which has the username in it to use for running scripts, but I do not appear to have such a file. Is that normal on 2k3?
Any help would be appreciated. My next resort is going to be to backup my www, and uninstall and reinstall IIS, which I would like to avoid, as my plethora of other web projects are all working. Thanks!!Update: I was wrong about the machine.cfg file, because I had the wrong extension, I see now that it's machine.config. However, I followed a knowledge base article which said to create a weak user, give it log on as a batch rights, and then add it to the machine.config file and reboot. Still no soup.
Um, bump? Anybody have any ideas? I'm still stuck on this, and haven't found anything else in my research.
Thanks in advance!
JazzGilbert wrote:
C:\Inetpub\www". The directory does not exist or is not accessible because of security settings
Who is listed on the security tab for WWW?
FYI I am also on 2003 server with AD
Have you configured the directory as an application and have you configured the web service extenstions for asp.net xxxxx
Is aspx listed in Virtual or Home Directory Tab: Configuration...:Mappings Tab:Application extensions for your application subdirectoy?
Ok, on the WWW folder under Security, I've got the following:
ASPUser with Full Rights (I created this user per the KB article)
IIS_WPG with Read & Execute
the Internet Guest Account (IUSR_machinename) with Read & Execute
the Launch IIS Process Account (IWAM_machinename) with Read & Execute
I've tried, one at a time, giving them full control, that didn't make a difference.
Maybe that's the issue, (configuring the directory as an app) because all I did was create a folder in my WWW and made sure it had the same rights as the WWW folder.
As far as extensions, I am able to run notepad created .asp files. It's the .aspx file I created in WebMatrix that fails. I think I have the right services setup, but here's a screenshot.
http://www.abeyantdestiny.com/services.gif
I think you need to create an app on the directory tab of the folder.
Also check to see which application pool is selected. It should be "ASP.NET"
Then check the identity being used by that pool.
Also to test that is has nothing to do with webmatrix... take a extreamly simple html page that you know already works on your web page and simply change the extenstion from .html to .aspx
If it works then it is webmatrix that is causing the problem if it doesn't then it is a server config issuse.
Also I can perhaps send some screen shots of my config if you need. If desired then send an private email using this site and include your email address.