How to add cross domain support to WCF service

后端 未结 4 841
暖寄归人
暖寄归人 2020-11-30 07:07

I\'m trying to allow POST requests from my javascript app hosted at localhost:80 to a WCF REStful service hosted at a different port, but somehow it doesn\'t work. I\'ve tri

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 07:30

    Add these nodes to your Web.config:

    
      
        
          
            
            
            
            
          
        
      
    
    

    Ref: http://theagilecoder.wordpress.com/2014/07/07/wcf-and-cors-no-access-control-allow-origin-header-is-present-on-the-requested-resource/

提交回复
热议问题