开发者

How to embed files in Web.config?

开发者 https://www.devze.com 2023-04-01 02:12 出处:网络
I know this sounds insane but... Is there a way to embed files in the web.config??? Something like this

I know this sounds insane but...

Is there a way to embed files in the web.config???

Something like this

 <configuration>
    <system.webServer>
        <handlers>
            <add name="test" path="test.o" verb="*" modules="testmodule"
                embeddedFile="<![CDATA[<html><head><title>Test</title></head>
                <body><h1>I'm insane</h1></body></html>]]>" />
        </handlers>
    </system.webServer>
</configuration>

(I know embeddedFile doesn't exist nor it is the correct way to use CDATA. It is just a way to express what I want)

Basically I want to create a single file website in IIS (not ASP.NET) with custom Modules

When /test.o gets requested the embedded file should be sent to testmodule.

Is there any way to acomplish this or have I just gone 开发者_开发百科mad?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号