Groups > Application developers > Community Server Setup and Installation > Re: Problems to install application to IIS




Problems to install application to IIS

Problems to install application to IIS
Fri, 16 Nov 2007 09:16:03 +000
Hi, 

I have the two problems that I can't solve. I have developed my ASP.NET
application that uses SQL server database. It works fine on the computer I did
developed it on when started from Visual Studio. If I try to install it on IIS
I'm getting the followint error:

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and then
click the Refresh button, or try again later. 


--------------------------------------------------------------------------------


A name was started with an invalid character. Error processing resource
'http://localhost/Nastavnici/Default.aspx'. Line 1...

<%@ Page Language="C#"
MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="P...


However, when I try to start it on other computer, application works, but I
cannot access the main page of the application. I am always gets a message that
I cannot connect to the server. Other, less complex pages, works fine. All pages
use the same connection string and the same database. The error message is as
follow:

An error has occurred while establishing a connection to the server.  When
connecting to SQL Server 2005, this failure may be caused by the fact that under
the default settings SQL Server does not allow remote connections. (provider:
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) 
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: An error has occurred
while establishing a connection to the server.  When connecting to SQL Server
2005, this failure may be caused by the fact that under the default settings SQL
Server does not allow remote connections. (provider: Named Pipes Provider,
error: 40 - Could not open a connection to SQL Server)

Source Error: 


Line 2446:            }
Line 2447:            Lica.LiceDataTable dataTable = new Lica.LiceDataTable();
Line 2448:            this.Adapter.Fill(dataTable);
Line 2449:            return dataTable;
Line 2450:        }
 

Source File: d:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\nastavnici\649374bc\fdbfc932\App_Code.dsqq-xao.12.cs    Line: 2448 

Stack Trace: 


[SqlException (0x80131904): An error has occurred while establishing a
connection to the server.  When connecting to SQL Server 2005, this failure may
be caused by the fact that under the default settings SQL Server does not allow
remote connections. (provider: Named Pipes Provider, error: 40 - Could not open
a connection to SQL Server)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
Boolean breakConnection) +734963
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
   System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner, String
protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean
encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection
owningObject, Boolean aliasLookup) +820
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean
redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
  
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359
  
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
   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(DataTable[ dataTables, Int32
startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
+162
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
  
LicaTableAdapters.LiceTableAdapter.GetLicaFilteredByPrezimeCinStatusOrIzbornoZva
nje(String prezime, Nullable`1 cinId, Nullable`1 statusId, Nullable`1
izbornoZvanjeId) in d:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files\nastavnici\649374bc\fdbfc932\App_Code.dsqq-xao.12.cs:2448
   LiceBLL.getLicaFiltered(String prezime, Nullable`1 cinId, Nullable`1
statusId, Nullable`1 izbornoZvanjeId, Nullable`1 tipZavrsnogRadaId) in
d:\Inetpub\wwwroot\Nastavnici\App_Code\BLL\LiceBLL.cs:174

[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[ arguments,
Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
+72
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[ parameters, CultureInfo culture, Boolean
skipVisibilityChecks) +358
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[ parameters, CultureInfo culture) +29
  
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMeth
od method, Boolean disposeInstance, Object& instance) +482
  
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArg
uments arguments) +2040
   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.GridView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   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.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +1360
Post Reply
Re: Problems to install application to IIS
Sun, 18 Nov 2007 14:19:04 +000
have solved the first problem. It was caused by IIS, and I have preinstalled it.
However, the second problem still remains. Now I have the following situation,
my application is installed on two different computers, both with Windows XP. It
works fine on the PC with SQL Server 2005 developer edition, and the it doesn't
work on other PC with SQL Server 2005 Express. The same problem have occured on
the first PC, but I have solved it when I have assigned all privilegies to the
ASPNET, but the same thing does not work on the other PC. I think that the
problem is something about security settings and permissions, because all pages
that accesses database true the Queries from table adapter works fine. The one
page that uses stored procedures does not works. I have tried many different
things, different authentification modes (Windows, SQL Server or mixed),
different users with all permissions... But nothing. If I try to set Admin user,
and add ASPNET privilegies I'm getting the error as follow:

Login failed for user 'Admin'. 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
'Admin'. The user is not associated with a trusted SQL Server connection.

Source Error: 


Line 671:            this.Adapter.SelectCommand = this.CommandCollection[0];
Line 672:            TipSkole.SifrTipSkoleDataTable dataTable = new
TipSkole.SifrTipSkoleDataTable();
Line 673:            this.Adapter.Fill(dataTable);
Line 674:            return dataTable;
Line 675:        } 

Any suggestrions?
Post Reply
about | contact