0

I have an ASP.NET MVC 3 website hosted in a shared server. I want to create a WordPress blog in /blog (www.domain.com/blog).

I've created a Virtual Directory in my admin panel pointing to the blog directory which has all the WordPress files.

When I navigate to www.domain.com/blog, I am receiving the following error message:

Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

So:

  1. Is it possible to have a Wordpress blog (PHP) running in /blog?
  2. Is this approach (Virtual Directory) correct? If yes, how to fix this error?
  3. If it is not correct, how could I get /blog running?
0

2 Answers 2

2

I'd like suggest a different approach, that I did with my project and seems to be a stable solution.

  1. Create an area "Blog" in your existing ASP.NET MVC project.
  2. Use this pretty simple repo to create front end of blog into that area. Ignore admin part. https://github.com/VJAI/JustBlog

  3. Use Wordpress API's as your data engine to to populate data in your newly created area. https://developer.wordpress.com/docs/api/

  4. Edit robot.txt of your original Wordpress blog and stop it from being crawled by search engines. If possible put old wordpress blog under maintenance mode as well.

You will have your new blog at www.mywebsite.com/blog

Sign up to request clarification or add additional context in comments.

Comments

0

You'll need a virtual application not a directory. Furthermore, your host must have PHP configured properly for IIS; not all do this.

Lastly, you will likely need a web.config file in the blog directory to "undo" any ASP.NET configuration inherited from the root. This will be specific, based on your root app. Give it a try without worrying about this first.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.