473,508 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET Website Project

Dear all,

When i create a website using Visual Studio 2005 i have an option to
choose based on the local file system or the http:// address;
For the local file system, when i later run my web site, the asp.net
development server starts and it assigns a random port to the web
server while for the second option by choosing a http:// address for
the web site project, no random ports will be assigned.

More convenient for me is let people access my website without the
random port, but my problem is:
Even though i specify the same connection string for both projects, i
can't view if i created the project with http:// file system! i always
get this sql exception: select permission denied on object ........ for
that particular view!
It seems that if the asp.net development server was not started and did
not assign a random port, then i have no permissions!
My assumption then, is that by an addrsss with default port 80, a
different computer account is assigned; i guess NT AUTHORITY\NETWORK
SERVICE, else it would be DOMAIN\ASPNET computer user!

I just simply have no clue how to make my site have no assigned random
ports such as http://localhost:3046/MyProj/Default.aspx, but at the
same time that i would have enough permission to access my DB.

I appreciate your response

Best regards

Apr 24 '06 #1
13 1737
I have uploaded two pictures to illustrate what i meant:
Picture #1 => http://www.abuabdou.com/file.gif
Picture #2 => http://www.abuabdou.com/http.gif

Apr 24 '06 #2
On 23 Apr 2006 18:18:15 -0700, coosa wrote:
I just simply have no clue how to make my site have no assigned random
ports such as http://localhost:3046/MyProj/Default.aspx, but at the
same time that i would have enough permission to access my DB.


This has nothing to do with random ports. When you do an HTTP site, then
your code is running under IIS. If you do a filesystem project, then it's
running under the Development server (Cassini). The development web server
runs as the account you are logged in with, while IIS runs as the OS
defined user (under XP, this would be (LOCALHOST)\ASPNET for asp.net code).

If your connection string is using integrated authentication, then you need
to give whatever account you are using access to your database. If you're
using a username/password then you have to give that user access.

Since you mention domains. What's probably happening here is that your SQL
server is on a seperate machine, and you're giving your own domain user
account permission. This works in Cassini, but fails with IIS because IIS
uses a local machine account by default.
Apr 24 '06 #3
"If your connection string is using integrated authentication, then you
need
to give whatever account you are using access to your database" ...
My Connection string includes: "Integrated Security=True"; Besides, my
ASPNET account in the database is already assigned enough permission to
perform all possible operation i require for my application.

Apr 24 '06 #4
re:
I just simply have no clue how to make my site have no assigned random
ports such as http://localhost:3046/MyProj/Default.aspx

To specify the Web server for an already-created Web site,
open your local website with VS.NET and, in the Solution Explorer,
right-click the name of the Web site for which you want
to specify a Web server, and then click Property Pages.

In the Property Pages dialog box, click the Start Options tab.
Under Server, click "Use custom server".

In the Base URL box, type the URL that Visual Web Developer
should start when running the current Web site.

You can use localhost, your machine name, or an assigned domain name for your IP.

From that point on, the VS.NET IDE will not use the internal web server,
but will use IIS to open your pages, i.e., if you are working on default.aspx,
using localhost, it will be opened as : http://localhost/default.aspx and, if you are
working in the myapp directory, it will be opened as http://localhost/myapp/default.aspx .

If you also want to run an application directory as if it was the home directory,
follow the instructions given by Scott Guthrie in this blog :

http://weblogs.asp.net/scottgu/archi...21/431138.aspx

It's a real simple, although not very well known, workaround.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"coosa" <co*****@gmail.com> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com... Dear all,

When i create a website using Visual Studio 2005 i have an option to
choose based on the local file system or the http:// address;
For the local file system, when i later run my web site, the asp.net
development server starts and it assigns a random port to the web
server while for the second option by choosing a http:// address for
the web site project, no random ports will be assigned.

More convenient for me is let people access my website without the
random port, but my problem is:
Even though i specify the same connection string for both projects, i
can't view if i created the project with http:// file system! i always
get this sql exception: select permission denied on object ........ for
that particular view!
It seems that if the asp.net development server was not started and did
not assign a random port, then i have no permissions!
My assumption then, is that by an addrsss with default port 80, a
different computer account is assigned; i guess NT AUTHORITY\NETWORK
SERVICE, else it would be DOMAIN\ASPNET computer user!

I just simply have no clue how to make my site have no assigned random
ports such as http://localhost:3046/MyProj/Default.aspx, but at the
same time that i would have enough permission to access my DB.

I appreciate your response

Best regards

Apr 24 '06 #5
Thanks alot; it helped alot but still port 80 will not work with the
debugger; any idea why?

Apr 24 '06 #6
Any by the way; since it seems that may have aan answer for that; how
is it possible to type then an intra net address such as:
http://project/ instead of http://localhost/project/ ?
I see this in my university or any intra net enviroment such as the
faculty of information technology address as: http://fit/

Apr 24 '06 #7
As mentioned in the previous post, if you also want to run an application directory as
if it was the home directory, follow the instructions given by Scott Guthrie in this blog :

http://weblogs.asp.net/scottgu/archi...21/431138.aspx

It's a real simple, although not very well known, workaround.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"coosa" <co*****@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Any by the way; since it seems that may have aan answer for that; how
is it possible to type then an intra net address such as:
http://project/ instead of http://localhost/project/ ?
I see this in my university or any intra net enviroment such as the
faculty of information technology address as: http://fit/

Apr 24 '06 #8
i really did read it all through but failed to find some thing about
removing the 'localhost' from the http address.
i added also the address in the web site properties by the start up
options to be http://mysite:8080 instead of http://localhost:8080/ but
it failed.

Apr 24 '06 #9
If you mean the example you requested :
I see this in my university or any intra net enviroment such as the
faculty of information technology address as: http://fit/
that's just the machinename of the server, recognized by your Windows network.

You can connect to the web server of any machine in a Windows network,
running a webserver on port 80, by specifying its machinename in the http address :

http://machinename/

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"coosa" <co*****@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...i really did read it all through but failed to find some thing about
removing the 'localhost' from the http address.
i added also the address in the web site properties by the start up
options to be http://mysite:8080 instead of http://localhost:8080/ but
it failed.

Apr 24 '06 #10
I guess i'm bothering you with questions :-) but that's the price of
knowledge you have; people will always keep asking you! :-)

Any way, is it possible to map a certain http address such as
http://localhost:8080/ to http://machinename:80/ ? is the port 80 a
reserved port? can it be shared?

Apr 25 '06 #11
re:
is it possible to map a certain http address such as
http://localhost:8080/ to http://machinename:80/ ?
No. You cannot map a port to another port.

If you use http://localhost:8080/ it will be the same as http://machinename:8080/
If you use http://localhost:8081/ it will be the same as http://machinename:8081/
If you use http://localhost:800/ it will be the same as http://machinename:800/

You can create any number of websites which use different ports, until you run out of ports.

re: is the port 80 a reserved port?
No, but it *is* the default port for most webservers, IIS included.

re: can it be shared?
No. Web servers capture their assigned port and don't allow other software to run on it.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"coosa" <co*****@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...I guess i'm bothering you with questions :-) but that's the price of
knowledge you have; people will always keep asking you! :-)

Any way, is it possible to map a certain http address such as
http://localhost:8080/ to http://machinename:80/ ? is the port 80 a
reserved port? can it be shared?

Apr 25 '06 #12
Ok, this is my final question and i will stop bugging you after that
with all the appreciation for your time you've spent to assist me;

I wanted to switch back to to the http:// project location selection
instead of the local file system choice;
So i have an understanding that i will not be using the integrated
windows user account and that the DOMAIN\ASPNET machine account will be
instead used by IIS.
In my connection string i added those lines in my web.conf file:
<connectionStrings>
<add
name="MyConnectionString"
providerName="System.Data.SqlClient"
connectionString="Data Source=127.0.0.1;Initial
Catalog=MyDb;Integrated Security=SSPI; uid=sa; pwd=mypassword"
/>
</connectionStrings>
In my SQL Server Configuration Manager I allowed the "TCP/IP" and
"Named Pipes" Protocols.
However, when I try to execute a query through my browser i receive the
following sql exception:
"{"SELECT permission denied on object 'TableView', database 'MyDb',
schema 'dbo'."}"
Any idea?

Apr 25 '06 #13
re:
However, when I try to execute a query through my browser i receive the
following sql exception:
"{"SELECT permission denied on object 'TableView', database 'MyDb',
schema 'dbo'."}"
That is a *SQL Server* permission problem, not an ASP.NET or an IIS web server problem.

You need to make sure that the account which you are using to access
the database has read/write/change permissions for the database's objects.

If you are using Integrated Security you *still* need to add the user account which
ASP.NET is running as ( usually DOMAIN\ASPNET for Windows XP ) to the
database's users...and assign the appropiate database permissions for all the objects
which you want the account to access.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"coosa" <co*****@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com... Ok, this is my final question and i will stop bugging you after that
with all the appreciation for your time you've spent to assist me;

I wanted to switch back to to the http:// project location selection
instead of the local file system choice;
So i have an understanding that i will not be using the integrated
windows user account and that the DOMAIN\ASPNET machine account will be
instead used by IIS.
In my connection string i added those lines in my web.conf file:
<connectionStrings>
<add
name="MyConnectionString"
providerName="System.Data.SqlClient"
connectionString="Data Source=127.0.0.1;Initial
Catalog=MyDb;Integrated Security=SSPI; uid=sa; pwd=mypassword"
/>
</connectionStrings>
In my SQL Server Configuration Manager I allowed the "TCP/IP" and
"Named Pipes" Protocols.
However, when I try to execute a query through my browser i receive the
following sql exception:
"{"SELECT permission denied on object 'TableView', database 'MyDb',
schema 'dbo'."}"
Any idea?

Apr 25 '06 #14

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

Similar topics

1
1862
by: js | last post by:
Does anyone know how to create a web project with Visual Studio.Net 2003 on IIS6 running on Windows Server 2003? The IIS has the default website disabled, and a new website is created. I have...
2
1635
by: js | last post by:
I am using Visual Studio 2003. An IIS is installed on a separate box with the Remote Debugger server component from VS2003. Initially, I created a new blank project in VS2003 under the IIS's...
5
2569
by: NoNickname | last post by:
Basically, how do I know that the release versions of all components are being published? The Build | Configuration Manager is confusing me a little in VS2005. I have three projects in my...
1
2728
by: chaz | last post by:
Hi - What's the difference between a website, a project, and a solution when it comes to pure ASP.NET programming? I have a "solution." I can migrate this to my production web server just by...
2
2040
by: Rob Dob | last post by:
Hi, How do I go about installing another Web Site Project inside my existing VS2005 website project. I currently have both a forum WSP and my main WSP application within the same solution. Both...
13
2280
by: Kobee | last post by:
Hi, I'm having a few issues adapting to new 2.0 "website" project vs. the old 1.1 "web application". One of the major issues I'm having is with the notion of namespaces. Using the old way, I...
1
2975
by: kurt sune | last post by:
I am having trouble publishing a website for RELEASE. 1. web.config: <compilation defaultLanguage="vb" debug="false"> 2. in Configuration manager I set the configuration to Release for the...
2
4533
by: CodeMonkey | last post by:
Hi all I created a web site project using Visual Studio 2005 and then created the Deployment Project to deploy it. I set the virtual directory property on the web application folder to "testsite"....
3
1805
by: moondaddy | last post by:
What's the preferred (best) way to start a website project in VS 2005? I know of 2 ways and each creates a site differently and has different behavior. Open VS 2005 1) from the start page...
5
2991
by: daveh551 | last post by:
What, from a high level point of view, is the difference (in Visual Studio 2005) between Website (accessed with Open Website or Create Website from the StartPage) that is an ASP.NET Website, and a...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7321
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
7489
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
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5047
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
4705
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...
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.