This is my first ever ASP.Net project, so hopefully my problem will be easilly fixed.
I have a solution containing 2 projects. One is Windows Service, the Second is a MVC 4 Application.
I'm using Visual Studio 2012.
I'm running HttpSelfHostServer in the Windows Service. So far so good.
What I need to do, is get that HttpSelfHostServer to serve the MVC application (Basically I want a Windows service with a web interface).
So far, I'm trying to get the config.Routes.MapHttpRoute to point to the MVC App but I've had no luck.
Can anyone point me in the right direction please? I've read a few blogs post and other article in MSDN but I'm only getting myself more and more confused atm.
you will need to write code to host the MVC runtime. there is sample code for web.api, so reading the source may get your started. I'd download and get a buildable version of MVC before your started, in case you needed to make some source changes in MVC.
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
Dids
0 Points
1 Post
Basic HttpSelfHostServer question
Dec 18, 2012 02:03 PM|LINK
Hi,
This is my first ever ASP.Net project, so hopefully my problem will be easilly fixed.
I have a solution containing 2 projects. One is Windows Service, the Second is a MVC 4 Application.
I'm using Visual Studio 2012.
I'm running HttpSelfHostServer in the Windows Service. So far so good.
What I need to do, is get that HttpSelfHostServer to serve the MVC application (Basically I want a Windows service with a web interface).
So far, I'm trying to get the config.Routes.MapHttpRoute to point to the MVC App but I've had no luck.
Can anyone point me in the right direction please? I've read a few blogs post and other article in MSDN but I'm only getting myself more and more confused atm.
Thanks for reading.
Regards,
bruce (sqlwo...
All-Star
36644 Points
5432 Posts
Re: Basic HttpSelfHostServer question
Dec 18, 2012 03:32 PM|LINK
you will need to write code to host the MVC runtime. there is sample code for web.api, so reading the source may get your started. I'd download and get a buildable version of MVC before your started, in case you needed to make some source changes in MVC.
imran_ku07
All-Star
45785 Points
7698 Posts
MVP
Re: Basic HttpSelfHostServer question
Dec 20, 2012 06:10 AM|LINK
I think there are lot of chances that this will be supported very soon.
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD