Kaishu
Kaishu

Reputation: 377

Why default page in IIS unable to load page in iframe?

HomePage.aspx as: enter image description here

path to Default document set in IIS as "WebPages/HomePage.aspx"

When I hit URL as "localhost:88" then I'm unable to get default page but get error as: enter image description here

IIS structure as MyApplication -> WebPages -> HomePage.aspx,Login.aspx

But when I hit URL as "localhost:88/WebPages/HomePage.aspx" then I get page successfully.

Upvotes: 0

Views: 544

Answers (2)

Kaishu
Kaishu

Reputation: 377

It's a path issue, I have changed src="Login.aspx" to src="../WebPages/Login.aspx" and it works fine.

Upvotes: 0

Pranav Singh
Pranav Singh

Reputation: 20171

In Forms Authentication, any unaunthenticated(without logged in user) request are routed to Login.aspx or configured page in web.config.

It is redirected to Login.aspx since not authenticated then the path formed by request in iframe doesn't find login page there.

Try after session exists for user.

If you want direct want to jump to Home.aspx from some other site seems you need Single Sign On rather than iframe.

Upvotes: 1

Related Questions