我拥有一个WCF网络服务网站、网络服务图书馆以及一个和我拥有一个使用流星号的项目。
当我管理WCF项目并管理一个网络服务时,只要不提供进入该数据库的服务,它就进行罚款。
如果我援引一个与世行连接的网络服务,我总是在这里出现错误:
_sessionFactory = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(@"Server=MYSERVER;database=MYDATABASE;Trusted_Connection=true;")
.ShowSql()
)
.Mappings(m => m.FluentMappings
.AddFromAssemblyOf<WhygoDomain.Location>())
.ExposeConfiguration(cfg => new SchemaExport(cfg)
/* .Create(true, true)*/)
.BuildSessionFactory();
Which says: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
Inner Exception says: 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.)
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
我一直在这样做,但进展缓慢,这意味着我可以 t笑,这实在是可以接受的。
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.
我已尝试允许任何用户查阅数据库,但没有任何改动。 谁使用WCF测试客户,谁知道?
这个问题的结果是,我可以 t击我的网络服务,这对我来说是一个问题。 我会想我会试图随心处理或做些事情,但这种 would子是理想之举,因为我有丰富的网络服务工作。