LordALMMa
asked on
MySQL + EntityFramework 4 crashes on remote server
I'm quite new to both Silverlight and Entity Framework.
I have started a new application that uses the Entity Framework to connect to a MySQL table. It is supposed to populate a grid with the entities from the table.
Everything works greate from the development machine.
The MySQL server is a remote server and do accept connections and everything is simply perfect here.
However after publishing (VS2010) the application to the webserver I've got stuck with this error:
On a line that does the Single() method of Linq there's an error saying that "Sequence contains no elements". There are elements on the database however. Double-checked here.
Using IE i get another error (status bar - alerts):
Unhandled Error in Silverlight Application Load operation failed for query 'GetSacado'. The remote server returned an error: NotFound. em
System.ServiceModel.Domain Services.C lient.Oper ationBase. Complete(E xception error) em
System.ServiceModel.Domain Services.C lient.Load Operation. Complete(E xception error) em
System.ServiceModel.Domain Services.C lient.Doma inContext. CompleteLo ad(IAsyncR esult asyncResult) em
System.ServiceModel.Domain Services.C lient.Doma inContext. <>c__Displ ayClass1b. <Load>b_17 (Object)
That's it.
I can't run the remote debugger to check and I really don't know what's going on here...
I'm using MySQL Connector/Net 6.3.4.0
Any clue?
I have started a new application that uses the Entity Framework to connect to a MySQL table. It is supposed to populate a grid with the entities from the table.
Everything works greate from the development machine.
The MySQL server is a remote server and do accept connections and everything is simply perfect here.
However after publishing (VS2010) the application to the webserver I've got stuck with this error:
On a line that does the Single() method of Linq there's an error saying that "Sequence contains no elements". There are elements on the database however. Double-checked here.
Using IE i get another error (status bar - alerts):
Unhandled Error in Silverlight Application Load operation failed for query 'GetSacado'. The remote server returned an error: NotFound. em
System.ServiceModel.Domain
System.ServiceModel.Domain
System.ServiceModel.Domain
System.ServiceModel.Domain
That's it.
I can't run the remote debugger to check and I really don't know what's going on here...
I'm using MySQL Connector/Net 6.3.4.0
Any clue?
ASKER
The query should return ONE (and only one) element.
It's a test query that I'm using that checks for a specific PK ('11111111111111').
Using the MySQL Workbench from any machine (same user that I've used to create the Entity Framework model) I'm able to see the specific row with no trouble.
Running on the development machine also works fine.
Running on a remote server it sticks with that error.
As I said the same website works fine if it's LOCAL but when I publish it to my intranet IIS or remote IIS (DiscountAsp) I have this same issue ("Sequence contains no elements").
I'm using this code to filter the data:
contexto.Load(contexto.Get SacadoQuer y().Where( _sacado => _sacado.documento.Equals(' 1111111111 1111'))).C ompleted += loadSacado_Completed;
However if I'm not mistaken if this code works local and since it was not changed before publish, it should keep working there also...
Anyway, it is NOT possible that the query would not return data.
And it works on the development machine (development IIS).
Just not on a deployment IIS environment.
It's a test query that I'm using that checks for a specific PK ('11111111111111').
Using the MySQL Workbench from any machine (same user that I've used to create the Entity Framework model) I'm able to see the specific row with no trouble.
Running on the development machine also works fine.
Running on a remote server it sticks with that error.
As I said the same website works fine if it's LOCAL but when I publish it to my intranet IIS or remote IIS (DiscountAsp) I have this same issue ("Sequence contains no elements").
I'm using this code to filter the data:
contexto.Load(contexto.Get
However if I'm not mistaken if this code works local and since it was not changed before publish, it should keep working there also...
Anyway, it is NOT possible that the query would not return data.
And it works on the development machine (development IIS).
Just not on a deployment IIS environment.
Then I would check the config of the two machine and see what differs. I am not an ASP .Net programmer so I will most likely not be of much help then.
ASKER
Switched to SQL Server.
Not working too.
So it is NOT related to MySQL.
It's something related to the IIS and WCF RIA.
Keep getting the same errors.
Clues?
Not working too.
So it is NOT related to MySQL.
It's something related to the IIS and WCF RIA.
Keep getting the same errors.
Clues?
ASKER
Now I have found the error but no solution yet.
On the development machine I can access the service created by WCF-RIA:
http://localhost:58090/ClientBin/WebNS-Web-Services-BoletoService.svc
However on the remote (intranet) server I cannot.
Accessing http://sites:2000/ClientBin/WebNS-Web-Services-BoletoService.svc shows me an 404 error.
Any clue here?
I may have to configure the IIS for this, but I'm not sure how and what needs to be done...
On the development machine I can access the service created by WCF-RIA:
http://localhost:58090/ClientBin/WebNS-Web-Services-BoletoService.svc
However on the remote (intranet) server I cannot.
Accessing http://sites:2000/ClientBin/WebNS-Web-Services-BoletoService.svc shows me an 404 error.
Any clue here?
I may have to configure the IIS for this, but I'm not sure how and what needs to be done...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you post the query?