Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Questions on Deployment Permissions in Internet Infromation Services 1

Status
Not open for further replies.

jjc3397

Programmer
Dec 21, 2003
55
US
I have a web application that I am trying to deploy. I have a permssions issue that is not letting the web page be pulled up under the LocalHost. I have followed all necessary steps to deploy the application and have it completeley ready except there is a permission issue setting or settings that is not letting me pull the web application up from the internet explorer. In Visual Studio the web application pulls up fine when I click the green debug arrow button and it pulls up in the internet explorer.

In the Internet Information Services/Websites/Default Web Site/MileageCalculator, I right click the mouse with MileageCalculator highlighted and I click Properties. What Document Settings are needed? Do I enable Default Docs Listed such as: CarMileage.aspx, Mainmenu.aspx, and Default.aspx by adding them to the list? On Virtual Directory, the radio is button--A Directory Located on my computer is indicated. The local path is C:\MileageCalculator. Read is checked. Do I need to check anything else on the Virtual Directory Settings?

On Directory Security what settings is needed here? Do I check Anonymous Access, Digest Authentication, Basic Authentication, or Integrated Authentication.

I believe the settings are just not correct in ISS?

Any help would be appreciated.

jjc3397
 
without an error message/number, event log or stack trace it could be any number of things.

what does the page display when you attempt to vist the website? Are there any event logs related to the problem, if so please post.

also we will need versioning information:
asp.net 1.x or 2.0 or 3.0?
IIS 5, 6, 7?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

The ASP.Net Version is: 2.0.50727
The ISS Version is: 5.1
The error message I am getting is:

Server Error in '/MileageCalculator' Application.
--------------------------------------------------------------------------------

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): Login failed for user ''. The user is not associated with a trusted SQL Server connection.]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
 
jjc3397 said:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
are you trying to connect using network credentials(DOMAIN\username), or a Sql user (defined username & password)?
what authentication mode is enabled set in the web.config?
what options are enabled/disabled in the Directory Security tab->authoritaztion & access of the virtual direction?


Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

I am trying to connect using Network credentials. User ID is: IUser_3-36641.

The authentication Mode enables and set in the Web Config is: Windows

On the Directory Security Tab Under ISS Properties has:

Anonymouse Access is Not Marked
All Others are marked here. The Realm is: 2Seater.Local
 
uncheck digest, basic and .net passport authentication and try to connect.

does IUser_3-36641 have access to the database?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

The IUser_3-36641 is My Local Machine.

I do not have the .net passport authentication listed in the ISS 5.1 version.

I wonder if User 3-36641 which is I has anonymous access to the database?


 
your local machine has no rights on the network, so i won't be able to connect. does your web.config contain an Identity tag? if not include it. this should fix the problem.
Code:
<authentication mode="Windows"/>
<identity impersonate="true"/>

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

I opened Web Config and under authentication,

<authentication mode="Windows"/> is there already.
I added <identity impersonate="true"/> underneath.

But, web page still will not come up.

 
are you still getting the same exception and error message?
I'm assuming your IIS sever and database are within the same intranet. i'm also assuming you are using AD to authenticate to your domain.

are these assumptions correct?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

Yes, all of these assumptions are correct. I finally got the web page to pull up, but I am not able to pull the web page up from another machine.

In the address bar, I type and it pulls up fine on my machine, but when I type the address on another machine it does not pull up.
 
one last thing to check.
IE>Tool>Internet Options
Advanced Tab
Security>Enable Integrated Windows Authentication

Windows XP and SP2 have this enabled by default. Old machines have this disabled.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

My machine as well as others have this checked on the Advanced Tab on Internet Options.
 
is the other machine getting the same error message as before or a different error message.

to see the error from the clients machine Set <CustomErrors mode="Off" /> in the web.config

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

The webConfig File I have: I made this change after uncommenting.

?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns=" <appSettings/>
<connectionStrings>
<add name="MileageComputingConnectionString" connectionString="Data Source=3-036698;Initial Catalog=MileageComputing;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="MileageComputingConnectionString2" connectionString="Data Source=3-036698;Initial Catalog=MileageComputing;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="MileageComputingConnectionString3" connectionString="Data Source=3-036698;Initial Catalog=MileageComputing;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="MileageComputingConnectionString4" connectionString="Data Source=3-036698;Initial Catalog=MileageComputing;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="MileageComputingConnectionString5" connectionString="Data Source=3-036698;Initial Catalog=MileageComputing;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="MileageComputingConnectionString6" connectionString="Data Source=3-036698;Initial Catalog=MileageComputing;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="MileageComputingConnectionString7" connectionString="Data Source=3-036698;Initial Catalog=MileageComputing;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<identity impersonate="true"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
-->
<customErrors mode="off" defaultRedirect="GenericErrorPage.htm">
</customErrors>
<!--
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />


-->




</system.web>
</configuration>
 
Off must be capitalized. the web.config is case sensative
<customErrors mode="Off" />

nothing seems out of place in the web.config. Although i would recommend removing the extranious connection strings.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Jason,

I appreciate you taking your time yesterday to help me with the Web Programming issues. I am still working on trying to get the web application to pull up on another machine. I believe I have to deploy the application to a network server in our complex. Not sure. Anyhow, I appreciate your help yesterday.

jjc3397
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top