Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New .NET 4.5 project supporting Owin.Host.SystemWeb #241

Merged
merged 2 commits into from
Jan 5, 2016

Conversation

berniezhao
Copy link
Contributor

I created a new .NET 4.5 project i18n.Owin.SystemWeb to support Owin hosted in IIS.
The project is still dependent on System.Web so it is not "pure" Owin but more like an intermediate version for Katana only.
"Pure" Owin support will require restructure the code base. We will probably need to separate the code to more packages (i18n.core, i18n.owin, i18n.systemweb, i18n.owin.systemweb) so I'm leaving the decision to other folks.

The existing i18n project is not changed except for incorporating fix by suddenelfilio https://github.com/suddenelfilio/i18n/commit/ca753201ad294552163f4b3320b1dba25234e4b9

If you use it in ASP.NET, all the existing configuration/setup still works. If you use it in Owin hosted in IIS, you can configure middleware by code (no web.config change in this case).

public partial class Startup
{
    public void Configuration(IAppBuilder app)
    {
        ...
        ...

        // i18n
        app.Use(typeof(UrlLocalizationMiddleware));
        app.Use(typeof(EntityLocalizationMiddleware));

    }
}

@berniezhao
Copy link
Contributor Author

And sorry for having to create it in VS2013. I don't have 2012 at the moment...

@turquoiseowl turquoiseowl merged commit acd5acd into turquoiseowl:master Jan 5, 2016
@turquoiseowl
Copy link
Owner

Looks good, thanks.

Would you be able to write a small section in the README with respect to OWIN support in i18n as it stands after this addition?

@turquoiseowl
Copy link
Owner

I've added a stub OWIN section to the readme.

@berniezhao
Copy link
Contributor Author

will do.

@berniezhao
Copy link
Contributor Author

Pull request created.
@turquoiseowl I will create new new NuGet package "I18N.Owin.SystemWeb" if that's ok for you. The new package will have dependency on "I18N" NuGet package and .NET 4.5. Project will link back to your GitHub page.

@turquoiseowl
Copy link
Owner

I've merged the pull request.

WRT the NuGet package, I would rather be careful about being associated with binaries compiled by others. Would you mind removing myself and Daniel from the metadata of your package. Alternatively delete it and I'll re-create one from this end.

Thanks.

@berniezhao
Copy link
Contributor Author

Deleted. You can create a new one.

@turquoiseowl
Copy link
Owner

Hmmm, NuGet doesn't seem to allow package re-creation:

C:\DevRoot\DevGit\i18n\src\i18n.Owin.SystemWeb>nuget push i18n.Owin.SystemWeb.2.1.6.0.nupkg
Pushing i18n.Owin.SystemWeb 2.1.6.0 to the NuGet gallery (https://www.nuget.org)...
Failed to process request. 'The specified API key is invalid or does not have permission to access the specified package.'.
The remote server returned an error: (403) Forbidden..

Any ideas for a new name for i18n.Owin.SystemWeb?

@berniezhao
Copy link
Contributor Author

Hmmm... I18N.WebApi? I18N.Owin.Katana?

@berniezhao
Copy link
Contributor Author

@turquoiseowl I added you to the package owner. You can confirm the ownership and re-publish your compiled package. You can also remove me from owners.

@turquoiseowl
Copy link
Owner

I've settled with i18n.Adapter.OwinSystemWeb, reason being that arguably i18n.Owin.... should be reserved for a pure OWIN version of i18n - see #243. Let me know if you have problems. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants