1

I've an asp.net application where I'm rendering blazor server application like following:

<div id="newFreightToolContainer" runat="server">
    <embed type="text/html" src="<%= this.ResolveUrl("http://myBlazorApp/FMT?seg=pageLevel&IsHSB=0&storeId=" + SessionWrapper.RcommStoreID) %>" width="100%" height="800" frameborder="0" scrolling="auto" class="autoHeight" id="EMEA_Address_Frame" name="EMEA_Address_Frame">
  </div>

Now, the problem here is I've to pass some complex object having sensitive information from the asp.net app to my blazor app so, is that possible? or is there any way by which I can share the asp.net session object to the blazor server app? Can someone plz help me out here

LogicalDesk
  • 1,237
  • 4
  • 16
  • 46
  • Let's first check you know about the `component` TagHelper and have rejected it for valid reasons? – Mister Magoo Nov 17 '21 at 14:25
  • I'm much aware of component tag helper and I don't think it would be of any help because I'm asking about sharing some complex object between 2 applications, not between components. Please let me know if I missed anything. – LogicalDesk Nov 17 '21 at 19:18
  • I think you need to get the `HttpContext` - see this answer by @enet - https://stackoverflow.com/questions/53817373/how-do-i-access-httpcontext-in-server-side-blazor. Once you have that you should be able to access the session data like this `HttpContext.Current.Session["Key"]` – MrC aka Shaun Curtis Nov 17 '21 at 20:31

0 Answers0