It all started out with an application built by someone in marketing. She came to me and asked if it could be secured with a password. I thought this would be an easy task, but forgot about the simple fact that IIS wouldn’t pass the HTML files through the ISAPI dll.
So here we go. If you want to secure HTML documents you need to go through a number of steps.
- You need to tell IIS how to handle the HTML file. In this case we want to run the HTML file through aspnet_isapi.dll.
- Click on the Directory tab in your ASP.NET application in IIS
- Find the .aspx extension, open it, and copy the executable path
- Cancel out of .aspx extension and click the Add button
- Paste the executable path into this new extension window
- For extension, type in .html or .htm depending on what you are using
- Click on Limit to: and type in GET,HEAD,POST,DEBUG
- Make sure Script engine is checked and that Verify that file exists is NOT
- Now html documents will be mapped through the .NET ISAPI
- This is where it all gets interesting. I had done everything in IIS, but HTML files were not being rendered (it was a blank page). Here’s what I did to alleviate that.
- In the web.config add
<httpHandlers>
<add path="*.html" verb="GET,HEAD,POST,DEBUG"
type="System.Web.UI.PageHandlerFactory" validate="true" />
</httpHandlers>
- And…
<compilation>
<buildProviders>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
- This is what fixed my issue, and everything is now behaving as expected. How did you resolve it?
Helpful Resource: HOW TO: Migrate an ASP Web Application to ASP.NET While Retaining Existing File Name Extensions
Comments
(18)
Tags:
asp.net
|
Categories:
Setup, Code
This may very well be the understatement of the century.
SharePoint is not only hard to style, but it is so far from semantically correct markup and accessible code that it blows my mind. It has become less difficult to blow my mind these days.
I opened up the core.css file, which is the stylesheet that drives all of the SharePoint sites out of the box, and it is a gigantic 4,500 lines of CSS. That is incredible. To make matters worse, there isn’t a lick of inheritance. Among several other things, the same exact font family is declared a lot. Also, the core.css is declared last on the page, so forget about overriding the css that is already there.
Of course, people have found workarounds for much of these shenanigans. An article by Cameron Moll has great insight and also links to other great resources.
No wonder so many companies are using the out of the box styles. I am going to try and tackle this beast. Wish me luck and I will be sure to post my findings here.
Comments
(5)
Tags:
sharepoint, css
|
Categories:
Accessibility, Code, Setup
How’s that title for alliteration?
SharePoint Server 2007 does NOT automatically enable search for you. It’s as simple as that, so we need to do it.
- You need to go into Central Administrator first. This is where you maintain pretty much everything within your server farm.
- Click on Operations.
- Under Topology and Services, click on Services on Server.
- Make sure the Office SharePoint Server Search Service is enabled. If it is disabled, click Start.
- Enter your Shared Services Administration
- Under Search, click on Search settings
- If there are items in the index, and your search still doesn’t work, there may be other issues, like the Indexing Service for your server may not be started.
- Click on Content sources and crawl schedules
- There should be a Content Source already created: click on the name of that Content Source.
- Under Crawl Schedules, setup schedules for Full and Incremental Crawl
- Under Start Full Crawl, check Start full crawl of this content source
- Click OK
Now your content should be crawled. You will also be amazed to find that .pdf is not a default crawl type.
- Go back under Crawl Settings
- Click on File types and add the pdf extension
Phew, now we should have a semi functional search service. Keep in mind that there are many other settings that can be set. Nose around and setup the other sections of the search service.
Comments
(2)
Tags:
sharepoint, asp.net
|
Categories:
Setup