简体   繁体   中英

Wordpress on windows server with .net applications. Web.config error

I have migrated an old .net site to Wordpress. The old site had three separate applications sat underneath it and now I need to add these back in to the Wordpress site. - running on windows server 2016 (so Wordpress has its own web.config file)

I have tried iframes which works but I can't resize the frame to fit the content unless the applications and Wordpress sit in the same server due to cross-origin policy. I have moved the applications underneath the root of Wordpress as well as tried creating virtual directories in IIS pointing to separate directories for the applications. This way I can keep the applications in the same domain so I use jquery to interrogate the frame source and resize the frame to fit, however chrome is throwing up 403 errors on webresource.axd and the controls don't render correctly because the applications web.config file is not being hit.

I can remove the web.config from Wordpress and the applications start working, but Wordpress itself stops working.

Is there a way for the two to coexist? I have run sub applications in a parent .net applications a lot before and never had an issue.

I picked iframes as it seems the simplest solution to meet my needs, but if there is another way to get this running then I'm happy to try. All applications and the main site will be running with SSL as well.

Turns out the web.config file in the parent application had a URL rewrite in which was affecting the child apps. Amended the child app config files to clear that rewrite and all is working as it should now.

Thanks for the ARR suggestion though. I like the look of that and will definitely investigate it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM