Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

[Announcement] Microsoft.AspNet.Cors version changed to 6.0.0 #38

Closed
pranavkm opened this issue Sep 22, 2015 · 12 comments
Closed

[Announcement] Microsoft.AspNet.Cors version changed to 6.0.0 #38

pranavkm opened this issue Sep 22, 2015 · 12 comments
Milestone

Comments

@pranavkm
Copy link
Contributor

Discussion thread for aspnet/Announcements#73

@henkmollema
Copy link
Contributor

@pranavkm aspnet/Announcements#73 still links to #24, which is closed.

@pranavkm
Copy link
Contributor Author

@henkmollema sorry about that. Fixed.

@henkmollema
Copy link
Contributor

Great! 😄

@Eilon Eilon added this to the 1.0.0-beta6 milestone Sep 22, 2015
@Eilon Eilon removed the question label Sep 22, 2015
@Eilon Eilon modified the milestones: Discussions, 1.0.0-beta6 Sep 28, 2015
@snapbatch
Copy link

@pranavkm @Eilon I am having issues adding two dependencies to support
"Microsoft.AspNet.Cors": "6.0.0-beta8-15719",
and

"Microsoft.AspNet.Cors": "5.2.3",
"dependencies": {
"Microsoft.AspNet.Cors": "6.0.0-beta8-15719",
"Microsoft.AspNet.Cors": "5.2.3",
}

If I remove 1 the other fails. Is there a way to support both?

@pranavkm
Copy link
Contributor Author

pranavkm commented Oct 8, 2015

Dnx does not allow a project to reference two versions of the same package.

@snapbatch
Copy link

@pranavkm they cant be the same package because when I remove 5.2.3 I lose support for System.Web.Cors, but when I remove beta-8 I lose support for IApplicationBuilder.UseCors

@snapbatch
Copy link

Ive created our own CorsPolicy which is implementing ICorsPolicyProvider which required Microsoft.AspNet.Cors": "5.2.3

@pranavkm
Copy link
Contributor Author

pranavkm commented Oct 8, 2015

Running ASP.NET 4.6 components inside of DNX isn't supported. You'd need to port your class library to target the policy provider in Microsoft.AspNet.Cors.Core - https://github.com/aspnet/CORS/blob/dev/src/Microsoft.AspNet.Cors.Core/ICorsPolicyProvider.cs

@snapbatch
Copy link

Thanks @pranavkm does the dnx support ICorsPolicyProviderFactory? I am trying to set my cors using the method HttpConfiguration.SetCorsPolicyProviderFactory

@pranavkm
Copy link
Contributor Author

pranavkm commented Oct 9, 2015

Add your custom provider to the DI container in Startup -

public void ConfigureServices(IServiceCollection services)
{
    services.AddTransient<ICorsPolicyProvider, MyCorsPolicyProvider>();
    ....
}

@snapbatch
Copy link

@pranavkm thanks all set.

@Eilon
Copy link
Member

Eilon commented Jun 9, 2017

We are closing this issue because no further action is planned for this issue. If you still have any issues or questions, please log a new issue with any additional details that you have.

@Eilon Eilon closed this as completed Jun 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants