I've been looking at this issue for quite a while now.
Basicly what the issue is that IIS 7.5 and IIS Express both ignore the following two lines:
I've googled and searched here on stackoverflow and most just suggest adding those two lines, but it does not matter what I do(reboot server, create a new app pool) it does not work.
Anyone got any ideas to why this happens?
you also need to add ValidateInput(false) to your action if you are dealing with MVC.
or add deriective on the page if you are working on web forms
Related
I really hope someone can help me with this since I've been struggling for days without luck.
I'm kind of new to web development and I've been doing tutorials. I already created my portfolio website and I hosted it on GitHub pages. I liked it and I decided to give it a custom domain name. I bought my domain through GoDaddy.com and I couldn't be able to correctly point it to my website hosted on GitHub Pages.
I tried different tutorials, these include this, this, this and this. None of them works for me. I'm not sure what I'm doing wrong or if there is something outdated in those tutorials but this is getting maddening.
To sum up,
I go to DNS management of my domain at GoDaddy.com.
Changed in the records tab all the A-type to the GitHub IP values (185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153) and the CNAME type to my [username]github.io website value.
Added CNAME file to my repository
Added my custom domain in portfolio>settings>github pages
Not sure where is my error and if someone can help me with this I will really appreciate it. If you need more details let me know.
Thank you in advance!
Welcome to the webdev world!
When did you actually register and redirect the domain? I've had multiple issues on several occasions which was resolved by just waiting.
Usually your ISP or just generally something you don't have control of does cache some stuff so you might need some time for it to pass in order to function properly.
Technologies used:
BreezeJS
OData
Web API 2
MVC 5
IDE: Visual Studio 2013
I've been wrestling with the idea of having a Web API project and a separate web site project in a single solution.
My Web API 2 project opens up as: localhost:2020/ExampleProject.API
My MVC 5 WebSite project opens up as: localhost:5050/ExampleProject.WebSite
Now by default web api doesn't allow cross origin policies. So I played around with enabling CORS in my Web API 2, although I was able to get it to work, it only works for the latest browsers; I need the backward compatibility of IE7 to IE9.
So I played around with JSONP. I'm not fond of the lack of support that exists for this. I was able to get it to work for my Web API 2 project, but it doesn't work if I wanted to use BreezeController if using the breezejs web api library. It also doesn't work if I wanted to create an ODataController.
So I'm moving away from the idea of cross origin sharing; though hoping that in the future there will be enough support for jsonp regardless if I use BreezeJS WebAPI helper or ODataControllers.
For now, I have no idea how to put my WebAPI project and my MVC 5 Website under the same domain where I can have:
localhost/ExampleProject.API
localhost/ExampleProject.WebSite
Do I have to make some configuration in my host file? if I want to run my projects from VS2013 would it be able to run both projects under the same domain.. or do I have to keep on manually changing the URL in the browser?
Well, the answer was really really simple.
I know this an old question, it was just that I forgot how to do it since it's been so long since I did this. Searching for the answers on google and on stackoverflow was difficult since the discussions talked about setting up cross origin policies instead of setting up a same origin policy.
I spent the good portion of my time putting everything on IIS.
Created a website and had it point to the physical path where my website csproj and bin folder is located. I gave it a hostname of "dev.example.com" and changed my hostfile for 127.0.0.1 to refer to dev.example.com
Created a Web Application for the website, and set it up for web api 2 project. Everything magically worked after that.
The dumb part was, I could have easily done this in visual studio. I remember in VS2010, this cause many problems, but in 2013, I guess bugs have been fixed and it works now.
I had my WebSite project set up as
localhost:2020/ExampleProject.WebSite (incorrect)
instead of
localhost:2020 (correct)
and created a virtual directory. I do this by right clicking the project, going to properties, under "Web" tab.
So basically, the rule of thumb was to get my website to be my main root domain, and to copy that full domain to any web application I want to add under it.
So: website would be:
localhost:2020
web application:
localhost:2020/ExampleProject.API
I'm reading [https://github.com/ServiceStack/ServiceStack/wiki/Run-servicestack-side-by-side-with-another-web-framework][1] but it doesn't explain enough or give a solution example (or I just don't know of an an example in the SS github site I can see something like this working with ASP.NET MVC and using that location element).
So I don't understand this custom service path from a Solution/Project perspective in the location element.
Here's how my current Solution looks:
Just a bit about the above pic. The MVC project that I created is that one I outlined in orange. I added then the ServiceStack projects I'll need to work with (we want to work with the actual code from SS, not binaries).
So now I'm looking back at the web.config that sits in my MVC proj as you can see in the pic which is open. So this "/api" for example, so what is that referring to? Like Our "Service" that we are gonna expose is in a different project ..you see that at the top, the project Called ServiceInterface.
I'm trying to understand how this works for the location. Location of what and how would I set that up in my solution here just for example?
#CoffeeAddict
sorry, but as a simple ServiceStack user like you, I feel the need to tell you
that it is good to have a lot of questions, but
Here is not private support, please make meaningful questions for all the others.
Don't waste time of mythz. We expect from him to deliver the new ServiceStack version.
If he is successful, all of us we will be too.
P.M
down in the page that you mentioned Run servicestack side by side with another web framework
there is an example of config Example config file for Asp.Net 3.5 in /api.
Maybe it is not appropriate for you, but it is not true, that there is not example.
Also, these questions
Running ServiceStack side by side with MVC
Service Stack on MVC4
the following is from you at Sept 25. It was answered from mythz.
Setting up Web.config to work Side-by-Side with ASP.NET MVC 4
Maybe you are not satisfied of course, but what to do about ? nothing.
check this also
ServiceStack.Host.Mvc / content / README.txt
Here
a user's blog post A mixed ASP.Net MVC 4 and ServiceStack reference project
and his sample project in githup DiffStack
I have a plain-vanilla MVC 4 Web Api project created using VS2012.
The (/api/Values) works out-of-the-box on the localhost but NOT when deployed on IIS (packages created using the standard "Publish..." from the project menu).
After been through lot of articles and reading suggestion for similar issue I found the Route tester which visualized how IIS was interpreting the request.
As the screenshot revels, the IIS is interpreting ~/api/values as ~/api/values.aspx
Any input on why this is happening and suggestion on how to resolve it is highly appreciated.
Thanks a lot for the help.
I am trying to deploy my fusioncharts chart on an actual web server. It is written in ASP and VB. Also I have been able to deploy the charts on IIS through my localhost. So does anyone know if you need to change something simple or anything like that? One last thing is that my HTML code on the asp file shows up but not one smidgen of ASP code is visible...... Thanks for the help in advance :)
Ahhh I just found out how to do it. First of all apparently asp code isn't visible when your trying to test it from the server. You have to go to the actual website to view the page..... I guess thats what you meant by testing Nathan....:P Thanks