user1135625
user1135625

Reputation: 3

Display PDF in ASP.Net such that it cannot be crawled

The behaviour I am trying to implement is as follows:

The path of the pdf is not revealed anywhere and this pdf cannot be crawled.

Any pointers in how to implement this functionality using ASP.Net 3.5 will be much appreciated.

Upvotes: 0

Views: 159

Answers (2)

LuckyStrike
LuckyStrike

Reputation: 1493

Create a robots.txt file and place it in thee root folder of you web application. Files are not crawled but you can link them with normal tag. No need for server side processing:

# robots.txt
Disallow: /FolderWithFilesThatCannotCrawled/

More Details

Upvotes: 1

Lilith River
Lilith River

Reputation: 16468

It looks like a javascript postback. A LinkButton should provide the same behavior.

However, do realize you're violating REST principles with this approach, and it's very hackish.

Upvotes: 1

Related Questions