473,412 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

write permission denied

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
Jul 24 '07 #1
12 1663
"Dica" <ge*****@hotmail.comwrote 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

Jul 24 '07 #2

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:O1**************@TK2MSFTNGP03.phx.gbl...
"Dica" <ge*****@hotmail.comwrote 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

Jul 24 '07 #3
"Dica" <ge*****@hotmail.comwrote in message
news:DTmpi.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

Jul 24 '07 #4

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
"Dica" <ge*****@hotmail.comwrote in message
news:DTmpi.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

Jul 24 '07 #5
"Dica" <ge*****@hotmail.comwrote 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

Jul 24 '07 #6

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:OH*************@TK2MSFTNGP02.phx.gbl...
"Dica" <ge*****@hotmail.comwrote 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

Jul 24 '07 #7
"Dica" <ge*****@hotmail.comwrote 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

Jul 24 '07 #8

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:OA****************@TK2MSFTNGP05.phx.gbl...
"Dica" <ge*****@hotmail.comwrote 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

Jul 24 '07 #9
"Dica" <ge*****@hotmail.comwrote 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

Jul 24 '07 #10

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:uM**************@TK2MSFTNGP03.phx.gbl...
"Dica" <ge*****@hotmail.comwrote 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...?
i think this is a matter of semantics. the machine where my app is
considered 'local' during the installation. local machine becomes any other
machine i'm on after the installation. for instance, if i install my app on
a PC with netBios name 'terminal1', i'd consider that my local machine. once
i'm done installation, i go to another PC with netBios 'terminal2' which is
now 'local machine'. terminal2 shoulld be able to use the web application on
terminal1 via IP or DNS addressing.
>

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

Jul 24 '07 #11
"Dica" <ge*****@hotmail.comwrote in message
news:Ypspi.47147$Io4.33388@edtnps89...
>>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...?

i think this is a matter of semantics. the machine where my app is
considered 'local' during the installation. local machine becomes any
other machine i'm on after the installation. for instance, if i install my
app on a PC with netBios name 'terminal1', i'd consider that my local
machine. once i'm done installation, i go to another PC with netBios
'terminal2' which is now 'local machine'. terminal2 shoulld be able to use
the web application on terminal1 via IP or DNS addressing.

Ah - when you said "remotely via WWW" I understood WWW to mean worldwide web
i.e. the Internet, not your local workgroup...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 24 '07 #12

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:ev*************@TK2MSFTNGP06.phx.gbl...
"Dica" <ge*****@hotmail.comwrote in message
news:Ypspi.47147$Io4.33388@edtnps89...
>>>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...?

i think this is a matter of semantics. the machine where my app is
considered 'local' during the installation. local machine becomes any
other machine i'm on after the installation. for instance, if i install
my app on a PC with netBios name 'terminal1', i'd consider that my local
machine. once i'm done installation, i go to another PC with netBios
'terminal2' which is now 'local machine'. terminal2 shoulld be able to
use the web application on terminal1 via IP or DNS addressing.


Ah - when you said "remotely via WWW" I understood WWW to mean worldwide
web i.e. the Internet, not your local workgroup...
i did mean WWW. i should be able to access the resources on terminal1 from
the other side of the world provided i've got a dns entry and forward port
80 to that machine through my firewall.

>

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

Jul 25 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Scott MacLean | last post by:
I'm pulling my hair out over this one. I've got a web page that I need to have write to another server across the network. The site in question does NOT run in anonymous mode, that is, the user is...
2
by: Mark Szlazak | last post by:
All files that I will be referring to are in the same file folder. I need my javascipt file to write or save the contents of a textarea to other local files. This is for local use only on one...
1
by: Mark E. Hamilton | last post by:
Sorry, I probably should have re-stated the problem: We're using Python 2.3.5 on AIX 5.2, and get the follow error messages from some of our code. I haven't yet tracked down exactly where it's...
0
by: Peter Horwood | last post by:
I am having trouble writing an XML file out on my localhost development machine. I get: Server Error in '/ProblemSolved' Application. -----------------------------------------------------------...
2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
3
by: nitinloml | last post by:
cs = open(r"session1.txt", "a+") cs.write(i) cs undefined, builtin open = <type 'file'> IOError: Permission denied: 'session1.txt' args = (13, 'Permission denied')
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
4
by: xzzy | last post by:
I have a v1.1 web app that works on my local computer. However, running it at the host computer, the following breaks: when a viewer selects a different country, the State dropdown should...
3
by: unauthorized | last post by:
I'm running a PHP 5.1 on an Apache 2.2 server under Windows XP which I use to develop my web apps. Currently, I am trying to add "upload" functionality to my project, but for some reason, when the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.