Note that there are some explanatory texts on larger screens.

plurals
  1. POFluent Nhibernate "invalid or incomplete configuration" when running in "WCF Test Client"
    primarykey
    data
    text
    <p>I have a WCF web service website, Web service library, and a and I have a Domain project which uses Fluent nHibernate.</p> <p>When I run the WCF project and run a invoke a web service it works fine, as long it's not a service that accesses the database.</p> <p>If I invoke a web service that accesses the DB, I always get an error here:</p> <pre><code> _sessionFactory = Fluently.Configure() .Database(MsSqlConfiguration.MsSql2008.ConnectionString(@"Server=MYSERVER;database=MYDATABASE;Trusted_Connection=true;") .ShowSql() ) .Mappings(m =&gt; m.FluentMappings .AddFromAssemblyOf&lt;WhygoDomain.Location&gt;()) .ExposeConfiguration(cfg =&gt; new SchemaExport(cfg) /* .Create(true, true)*/) .BuildSessionFactory(); </code></pre> <p>Which says: <strong>An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.</strong></p> <p>Inner Exception says: <strong>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)</strong></p> <p>I do not get this message if I do the following: 1) Right click on the webservice.svc and copy the "view in browser" link. 2) (in the WCF test client) right click on "my service projects"-> "add service" and paste in the URL from 1) above</p> <p>I have been working like this for a while, but it's a bit slower and it means I can't debug, which isn't really acceptable.</p> <p>What's happening here? It seems like a permission problem connecting to the database, but I'm new to most of this so it may be something else. </p> <p>I have tried giving permission to any user I can think of to the database, but no change. What user does the WCF test client use, does anyone know?</p> <p>The result of this issue is that I can't debug my web service which is a problem for me. I guess I could try attach to process or something, but this wouldn't be ideal as I have plenty of web service work on the horizon.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload