Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > write permission denied

Reply
Thread Tools

write permission denied

 
 
Dica
Guest
Posts: n/a
 
      07-24-2007
i'm working on an installation package that needs to write to an existing
folder on the user's system, but keep getting an error message about write
perms denied. i can't really ask the person installing my app to manually
grant write perms for ASPNET user account to the folder. what are my
options?

tks


 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-24-2007
"Dica" <(E-Mail Removed)> wrote in message
news:W9mpi.47093$Io4.11354@edtnps89...

> i'm working on an installation package that needs to write to an existing
> folder on the user's system, but keep getting an error message about write
> perms denied. i can't really ask the person installing my app to manually
> grant write perms for ASPNET user account to the folder. what are my
> options?


Slightly confused...

When you say "the user's system", are you talking about a client machine? If
so, what exactly are you trying to install there? Is this some sort of
"desktop" ASP.NET app...?


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
 
Dica
Guest
Posts: n/a
 
      07-24-2007

"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Dica" <(E-Mail Removed)> wrote in message
> news:W9mpi.47093$Io4.11354@edtnps89...
>
>> i'm working on an installation package that needs to write to an existing
>> folder on the user's system, but keep getting an error message about
>> write perms denied. i can't really ask the person installing my app to
>> manually grant write perms for ASPNET user account to the folder. what
>> are my options?

>
> Slightly confused...
>
> When you say "the user's system", are you talking about a client machine?
> If so, what exactly are you trying to install there? Is this some sort of
> "desktop" ASP.NET app...?


yes, i'm talking about a client machine.

and yes, this is a desktop ASP.Net app. my installation package needs to do
various things like create the IIS web site, install SQL Express, and then
copy over and attach an sql database. it's here that my app is crapping out
because the log files are created automatically by SQLDMO;

// attach the lighting_control db //

SQLDMO.Application sqlApp = new SQLDMO.ApplicationClass();

SQLDMO.SQLServer srv = new SQLDMO.SQLServerClass();



srv.Connect("localhost\lighting_control", "sa", "XXX");

// TODO - need to grant write perms on folder //

srv.AttachDB("Lighting_Control", @"[C:\lighting_db\lighting_control.mdf]");
// craps out here due to ldf creation //


>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-24-2007
"Dica" <(E-Mail Removed)> wrote in message
newsTmpi.47097$Io4.5428@edtnps89...

> yes, i'm talking about a client machine.
> and yes, this is a desktop ASP.Net app.


Wow!

> my installation package needs to do various things like create the IIS web
> site, install SQL Express, and then copy over and attach an sql database.
> it's here that my app is crapping out because the log files are created
> automatically by SQLDMO;


What installation package are you using? Presumably it doesn't have the
ability to modify ACLs etc...

But that's what you're going to have to do, one way or another...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Dica
Guest
Posts: n/a
 
      07-24-2007

"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Dica" <(E-Mail Removed)> wrote in message
> newsTmpi.47097$Io4.5428@edtnps89...
>
>> yes, i'm talking about a client machine.
>> and yes, this is a desktop ASP.Net app.

>
> Wow!
>
>> my installation package needs to do various things like create the IIS
>> web site, install SQL Express, and then copy over and attach an sql
>> database. it's here that my app is crapping out because the log files are
>> created automatically by SQLDMO;

>
> What installation package are you using?


well, i'm still working on that. this is a VS2005 solution which includes:
1. web site project
2. windows service project
3. installation project.
4. VS Setup project

the installation project is a windows forms based application, which walks
the user through various forms that require them to do things like accept a
disclaimer, specify a userName/password for the app, etc. the installation
app is primarily responsible for doing things like installing IIS, AJAX, SQL
Express and writing registry keys.

the VS Setup project is responsible for creating the program folder and
copying over the web site files. i'm primarily a web developer and have very
little experience with writing setup projects. from what i've seen so far
with the setup template, it's possible to specify any number of folders i
want created on the user's system, but i seem to have no ability to specify
folder permissions. if i did, it'd be a simple matter of granting write
perms on my DB folder to the aspnet account.

on an unrealated note, i'm still struggling with how to have the setup
project call/execute my installation.exe package once it's done copying over
the files. in other words, it seem a setup project is only capable of
copying files to the user's system and not capable of executing additional
apps.


Presumably it doesn't have the
> ability to modify ACLs etc...
>
> But that's what you're going to have to do, one way or another...
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-24-2007
"Dica" <(E-Mail Removed)> wrote in message
news:Zinpi.47100$Io4.14860@edtnps89...

> i'm primarily a web developer


I guessed...

> from what i've seen so far with the setup template, it's possible to
> specify any number of folders i want created on the user's system, but i
> seem to have no ability to specify folder permissions. if i did, it'd be a
> simple matter of granting write perms on my DB folder to the aspnet
> account.


That's right. What I usually do is write a WinForms executable which does
everything the Setup project can't (e.g. file and folder permissions) and
then add that as a Custom action at the Commit stage.

> on an unrealated note, i'm still struggling with how to have the setup
> project call/execute my installation.exe package once it's done copying
> over the files. in other words, it seem a setup project is only capable of
> copying files to the user's system and not capable of executing additional
> apps.


You simply add your executable to the Setup project, and then set it as a
Custom Action. If you add it to the Commit section, the Setup project will
run it when it's completed its own setup tasks...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Dica
Guest
Posts: n/a
 
      07-24-2007

"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Dica" <(E-Mail Removed)> wrote in message
> news:Zinpi.47100$Io4.14860@edtnps89...
>
>> i'm primarily a web developer

>
> I guessed...
>
>> from what i've seen so far with the setup template, it's possible to
>> specify any number of folders i want created on the user's system, but i
>> seem to have no ability to specify folder permissions. if i did, it'd be
>> a simple matter of granting write perms on my DB folder to the aspnet
>> account.

>
> That's right. What I usually do is write a WinForms executable which does
> everything the Setup project can't (e.g. file and folder permissions) and
> then add that as a Custom action at the Commit stage.
>
>> on an unrealated note, i'm still struggling with how to have the setup
>> project call/execute my installation.exe package once it's done copying
>> over the files. in other words, it seem a setup project is only capable
>> of copying files to the user's system and not capable of executing
>> additional apps.

>
> You simply add your executable to the Setup project, and then set it as a
> Custom Action. If you add it to the Commit section, the Setup project will
> run it when it's completed its own setup tasks...


perfect. i was assuming there'd be something in the setup project to allow
me to do that, but couldn't find it.

tks for all the help.


>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-24-2007
"Dica" <(E-Mail Removed)> wrote in message
news:2wppi.47120$Io4.39740@edtnps89...

> perfect. i was assuming there'd be something in the setup project to
> allow me to do that, but couldn't find it.


No problem.

> tks for all the help.


Welcome.

AAMOI, I'm curious as to why you chose a browser-based solution for what is
(to me, at least) fairly obviously a WinForms app...

I appreciate that you're primarily a web developer - so am I - but WinForms
is actually fairly straightforward. Certainly, it would have removed all the
hoops you're currently having to jump through just to get the thing
installed...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Dica
Guest
Posts: n/a
 
      07-24-2007

"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:OAP%(E-Mail Removed)...
> "Dica" <(E-Mail Removed)> wrote in message
> news:2wppi.47120$Io4.39740@edtnps89...
>
>> perfect. i was assuming there'd be something in the setup project to
>> allow me to do that, but couldn't find it.

>
> No problem.
>
>> tks for all the help.

>
> Welcome.
>
> AAMOI, I'm curious as to why you chose a browser-based solution for what
> is (to me, at least) fairly obviously a WinForms app...


i originally considered doing a winForms app, but decided that the user
should have the ability to access the app remotely via WWW if desired.

>
> I appreciate that you're primarily a web developer - so am I - but
> WinForms is actually fairly straightforward. Certainly, it would have
> removed all the hoops you're currently having to jump through just to get
> the thing installed...
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-24-2007
"Dica" <(E-Mail Removed)> wrote in message
news:rarpi.47138$Io4.9174@edtnps89...

>> AAMOI, I'm curious as to why you chose a browser-based solution for what
>> is (to me, at least) fairly obviously a WinForms app...

>
> i originally considered doing a winForms app, but decided that the user
> should have the ability to access the app remotely via WWW if desired.


And how are they going to do that if the app is installed on their local
machine...?


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed: The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {555F3418-D99E-4E51-800A-6E89CFD8B1D7} to the user NT AUTHORITY\LOCAL SERVICE SID (S-1-5-19). Skybuck Flying Windows 64bit 1 06-29-2009 06:17 PM
Workgroup Permission Denied (Usually) Bob Ryan Wireless Networking 2 09-28-2007 09:46 PM
bash: ./firefox-installer: /bin/sh: bad interpreter: Permission denied damon Firefox 7 08-29-2007 08:50 PM
Can't do setuid and file permission denied Chris Perl 1 10-28-2003 03:34 PM
bash: /root/remstats.pl: /usr/bin/perl: bad interpreter: Permission denied Goblin Perl 1 08-14-2003 11:11 AM



Advertisments