Skip to content

Problems when deploying the legacy app as a subsite #18

Open

Description

@Harl3

Hello!
loving this package so far, i'm trying to rewrite a legacy webforms app using blazor server.
However i'm having some problems when deploying the apps.
The legacy app is deployed as a subsite, so for example: https://legacyapp.domain.com/subsite
in the appsettings.json of the blazor app i've correctly set the urls using https://legacyapp.domain.com/subsite as destinationPrefix.
In this situation the proxy doesn't seem to work, i get correctly redirected to https://legacyapp.domain.com/subsite when opening the blazor app, but after authenticating i'm not redirected back to the blazor app, whereas while debugging locally everything works as expected.
I'm guessing is has to do with the legacy app being deployed as a subsite but i'm actually not sure.
Where i get redirected for authentication the return url is https://legacyapp.domain.com/subsite/Account/Login?redirecturl=~/ which obviously cannot work... i tried manually setting the redirect url to the url of the deployed blazor app but that doesn't work too, after auth i'm redirected to the legacy app.
How should i approach this situation?
Many thanks

Activity

  1. ThatRendle commented on Dec 2, 2021

    @ThatRendle
    Contributor

    Somebody else had something like this and fixed it by playing with the <proxy> settings in web.config - not sure of the details but maybe take a look?

    When I get time (next week?) I'll spin up an IIS VM in Azure and see if I can nail this down.

  2. Harl3 commented on Dec 12, 2021

    @Harl3
    Author

    Thanks Mark, i tried playing with the proxy element of the web.config in the legacy app as you suggested, but unfortunately i'm stuck in the same situation as before.
    i tried setting
    <proxy autoDetect="True" proxyaddress="URLOFTHENEWBLAZORAPP" usesystemdefault="True|False|" />
    and various combinations but nothing worked.
    I feel like i'm stuck banging my head on something that should just work, i guess i'm probably missing something really simple

  3. Michelh91 commented on Jul 7, 2022

    @Michelh91

    Thanks Mark, i tried playing with the proxy element of the web.config in the legacy app as you suggested, but unfortunately i'm stuck in the same situation as before. i tried setting <proxy autoDetect="True" proxyaddress="URLOFTHENEWBLAZORAPP" usesystemdefault="True|False|" /> and various combinations but nothing worked. I feel like i'm stuck banging my head on something that should just work, i guess i'm probably missing something really simple

    Hey, did you managed to get it working? I'm also having trouble getting this to work on a production IIS server.

    Everything works fine in development but once published the proxy stops working as expected.

    Also tried publishing the legacy app on a self site (ex https://appname.somedomain.com) but is not working either.

  4. Harl3 commented on Jul 7, 2022

    @Harl3
    Author
  5. Michelh91 commented on Jul 7, 2022

    @Michelh91

    Will keep trying, it works published on my local machine, not sure why not on remote server.

    Seems to only work if legacy app is published on root localhost, which is not so real world situation.

    Thank you for your reply 😀

    Hello! No, unfortunately not. My solution was to leave the company to stop
    working with webforms altogether.
    I hope it goes better for you

    Il gio 7 lug 2022, 12:36 Michelh91 @.***> ha scritto:

    Thanks Mark, i tried playing with the proxy element of the web.config in
    the legacy app as you suggested, but unfortunately i'm stuck in the same
    situation as before. i tried setting and
    various combinations but nothing worked. I feel like i'm stuck banging my
    head on something that should just work, i guess i'm probably missing
    something really simple

    Hey, did you managed to get it working? I'm also having trouble getting
    this to work on a production IIS server.

    Everything works fine in development but once published the proxy stops
    working as expected.

    Also tried publishing the legacy app on a self site (ex
    https://appname.somedomain.com) but is not working either.

    —
    Reply to this email directly, view it on GitHub
    #18 (comment),
    or unsubscribe
    https://github.com/notifications/unsubscribe-auth/AKXGIA226W2XXKCXDAC56WTVS2XKRANCNFSM5IRDKTVA
    .
    You are receiving this because you authored the thread.Message ID:
    @.***>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions