| Author |
Share Topic Topic Search Topic Options
|
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Topic: Need help with IIS Setup BOS Posted: 28-Jul-2010 at 6:42pm |
If the name of your virtual directory is "EntityService" and it's hosted by IIS, then the URL is http://localhost/EntityService/EntityService.svc. Try browsing to that to see if a WCF service page opens (the page will either display an error, which will help determine the problem, or a message that metadata publishing is disabled, which means the service has started.
If your client application's debug log says it connected to an EntityService on port 9009, check the objectServer settings in the app.config file. It also sounds like you might still be running the client piece of the application in Visual Studio, and the web application in the solution is still starting (which isn't a problem, but can be confusing).
|
 |
BillG
DevForce MVP
Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 1:23pm |
I don't think my BOS is running after all. When I go to my browser and type in http://localhost:9009/EntityService.svc, it can't display the web page. My app.config is looking for the EntityService.svc and that is the name of my virtual directory.
|
 |
BillG
DevForce MVP
Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 11:33am |
I just stepped through the code and here is the line causing the problem
TicketWare.IB.Designer.cs
public new sttaic TicketWareEntities DefaultManager{
get{ return GetDefaultEnityManager<TicketWareEntities>();
}
In my ViewModel class, I use the following line
private readonly TicketWareEntities entityManager = TicketWareEntities.DefaultManager;
I use this statement at the top of all my ViewModel classes.
Bill
|
 |
BillG
DevForce MVP
Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 10:47am |
The log only has one entry in it.
Log Created
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 10:19am |
|
OK, I would really just forget the TraceViewer right now and look in the debug log to see why the database connection is failing. By default the debug log is in the log folder for your web application.
|
 |
BillG
DevForce MVP
Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 10:00am |
I am able to connect to the BOS and I can run the app. The minute that the app tries to connect to the database and grab some data then it fails.
|
 |
BillG
DevForce MVP
Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 9:59am |
I got the traceviewer working by running in the app. It shows the connection to the publisher and then nothing further. So this seems to tell that I am not even getting a connection to the database.
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 9:57am |
Does this mean you're past the database connection failure and on to the next problem? Are you now able to connect to the BOS and run your client application? I would do this before trying the TraceViewer. The TraceViewer is a handy tool, but the same information is written to the debug log, so the viewer is not required for problem diagnosis.
The TracePublisher won't start up until there's some activity in your application
|
 |
BillG
DevForce MVP
Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 9:17am |
I am using sql server authentication. I am using a username and password in my connection string.
I deleted the server's copy of the app.config.
I removed the comment in the global.aspax for the TraceViewer. When I try running the traceviewer it still can't connect to the TracePublishing. my iis in on my development machine.
Bill
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 8:38am |
If you're failing on connecting to the database check the connection strings in your web.config. The service is now running under the identity of the application pool defined for the web site, so that account likely does not have database access. Unless you've set up a special account just for the web site / app pool you probaby do not want to grant the account privileges to your database. The easiest, and possibly best, approach is to use SQL authentication instead of Windows authentication when connecting to the DB.
Also, you don't need the app.config - it will not be used at all, so if you have anything in it, like connection strings, which you want to use be sure to put everything in the web.config.
|
 |
BillG
DevForce MVP
Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
|
Post Options
Quote Reply
Posted: 28-Jul-2010 at 7:58am |
I created my virtual directory called EntityService. It points to a directory on my development machine which has the following files in the root directory web.config, app.config, EntityServer.svc, EntityService.svc, global.aspax.
In the bin directory is located DomainModel.dll, IdeaBlade.Core.dll, entitymodel, entitymodel.edm, entitymodel.server, linq and validation.
I checked and rechecked, the domainmodel.dlls are the same. I even copied one over just to make sure again.
My debuglog says that it corrected to the EntityService at port 9009
I crash then trying to connect to the database
in my web.config do I need to set the endpoints for the entityserver and entityservice?
Bill
|
 |