This is a migrated thread and some comments may be shown as answers.

Newbie question - OpenAccess ORM and ODATA3

1 Answer 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luca
Top achievements
Rank 1
Luca asked on 11 Feb 2013, 04:46 PM
Hello,
I apologize now for probably obvious question, I just bought your products and today began my first application.

Following several tutorials I started the first project to try to use Kendo Grid and openaccess ORM.

Here's what I do:

- Create a new project c # kendo ui for MVC
- I choose to use OpenAccess domain model orm
- I create a new domain class test with some property
- Run "update db from model" and configure the connection

So far so good, the database is created and works.

Then I click "Add OpenAccess Service" and select "WCF .. - Odatav3" and finish.
It creates the file "EntitiesModelService.svc."

The problem is that if I click "View in browser" on that file to see if it works (as in yours tutorial) I always get an error

Server Error in '/' Application ...
The resource can not be found ...
HTTP404
RequestedUrl: / EntitiesModelService.svc "

What can I try? Please help me.
Thanks in advance,
Luca

1 Answer, 1 is accepted

Sort by
0
Accepted
Boris Georgiev
Telerik team
answered on 12 Feb 2013, 04:28 PM
Hello Luca,

If you want to open the "EntitiesModelService.svc." file in browser, you should add in
public static void RegisterRoutes(RouteCollection routes)
method which is in "Global.asax.cs" file this line:
routes.IgnoreRoute("{resource}.svc/{*pathInfo}");
This line will allow you to open .svc files which are outside of the MVC pattern - in your case "EntitiesModelService.svc." and "{*pathInfo}" at the end allows query strings to be ignored.

Without this line, ASP.NET MVC would try to map all the requests to controllers and action. Having the "IgnoreRoute" method means the URL will not map the URL to a controller as per the default behavior

I hope that helps.
 
Kind regards,
Boris Georgiev
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Tags
General Discussions
Asked by
Luca
Top achievements
Rank 1
Answers by
Boris Georgiev
Telerik team
Share this question
or