webmatrix and ASP.NET Web Helpers Library 1.1 - webmatrix

Can someone explain what happens when you install this package
Is it just a dll that is added somewhere?
Also is it possible to view the source for the helpers contained in this package.
Have searched the web but cant see any reference to source
thanks

Yes, the assembly is added to your WebMatrix project. You must install the helper library from the feed into each project that needs the helper library functionality (details below). The ASP.NET Web Helpers Library 1.1 includes several helpers, most of these helpers are explained in the WebMatrix online book at www.asp.net/webmatrix. The ASP.NET Web Helpers Library 1.1 also installs the Twitter helper and the Facebook helper. If you wish, you can install the Twitter helper and the Facebook helper independantly. You can view the assembly using Reflector, or if you have Visual Studio you can use the Visual Studio Object Browser, see the post Understanding WebMatrix Helpers using Visual Studio's Object Browser for more details. There's also the managed reference content on MSDN that will help you navigate the helper library code, see the Microsoft.Web.Helpers Namespace for details. The descriptions will be updated soon, however the syntax is all available now.
The following procedure shows how to use the Administration tool to install the ASP.NET Web Helpers Library. You will use some of these helpers in this tutorial and other tutorials in this series.
1.In WebMatrix, click the Site workspace.
2.In the content pane, click ASP.NET Web Pages Administration. This loads an administration page into your browser. Because this is the first time you're logging into the administration page, it prompts you to create a password.
3.Create a password.
After you click Create Password, a security-check page that looks like the following screen shot prompts you to rename the password file for security reasons. If this is your first time to see this page, do not try to rename the file yet. Proceed to the next step and follow the directions there.
4.Leave the browser open on the security-check page, return to WebMatrix, and click the Files workspace.
5.Right-click main project folder for your site and then click Refresh. The list of files and folders now displays an App_Data folder. Open that and you see an Admin folder. The newly created password file (_Password.config) is displayed in the ./App_Data/Admin/ folder.
6.Rename the file to Password.config by removing the leading underscore (_) character.
7.Return to the security-check page in the browser, and click the Click Here link near the end of the message about renaming the password file.
8.Log into the Administration page using the password you created. The page displays the Package Manager, which contains a list of add-on packages.
9.Find the ASP.NET Web Helpers Library 1.1 package, click the Install button, and then install the package as directed. When you install the ASP.NET Web Helpers library, the Package Manager also installs the FaceBook.Helper 1.0 library.

A bin folder is created and a DLL is added to it. You can use Reflector to look at the decompiled source code, although Reflector will not last long so you had better hurry. the docs for a number of the helpers can be found here

Related

Problem with "Edit and Continue" in a ASP.NET core mixed Razor Pages and MVC app

I'm trying to update an old webpage that I had developed using MVC. Now I'm adding Razor Pages, but then Edit and Continue won't work anymore.
I can isolate/reproduce the problem in a minimal context. It seems to occur when there are files both in Pages and in Views, e.g. _ViewStart.cshtml.
Here is how to reproduce:
Create an ASP.NET Core Web App, .NET 5.0, No Authentication, no HTTPs, no Docker, enable Razor runtime compilation
Place a breakpoint in IndexModel constructor
Run App
When hitting the breakpoint, edit the code (just add a semicolon in the ctor), continue: code will compile and continue
Add new folder "Views"
Copy _ViewStart.cshtml from Pages to Views
Run App again
When hitting the breakpoint, edit the code (just add a semicolon in the ctor), continue, get message: "Edits were made to the code which cannot be applied while debugging"
I could probably work around the issue, but I'd rather try to understand why this happens.
This also happens when I add the Identity package and try to customize the pages, in which case I also need a double _ViewStart.cshtml...
Any ideas?

How do I set a default static page for a ASP.Net Core Web API Project when start debug in VS2015?

I'm using VS 2015 and have a ASP.Net Core 1.1 Web API Project.
If I start debug it will launch Edge with the following url: http://localhost:XXXXX/api/values
I have since long removed this controller but it still tries to find it.
I have read the docs and made the appropriate changes to be able to show a static file.
In my wwwroot folder i have a Index.html file.
If i manually navigates to http://localhost:XXXXX the file is displayed.
My question is: How can I make VS2015 show my Index page when I start debugging.
I found the option when right clicking the project and selecting properties. Then under the tab Debug, enabled Launch URL and entered the value.
Edit Properties/launchSettings.json - it stores launch url which VS use.

FrontPage Cannot Publish One Specific Web Page

I have a web site that is designed and published using FrontPage 2003. I have changed 5 web pages in that web site. When I publish them, FrontPage doesn't show any error messages. I find that 4 of the web pages are published correctly, but one is not. The web site still has the old version of that web page in it.
I have tried deleting the old version from both FrontPage and from my published web site. But the problem comes right back as soon as I publish the web page with the same name. For example, here's how I deleted the old version:
Have a new version ready (such as web-page-TEST.htm).
Delete the old version from FrontPage.
Publish the web site. When FrontPage offers to remove the old
version that is still in the published web site, I tell FrontPage
to delete it.
Rename the new version to use the original web page name (such
as web-page.htm).
Publish the web page again. When FrontPage offers me to remove the
TEST version that is still in the published web site, I tell
FrontPage to delete it.
When I use browser to open the web page, I find that it still
contains the old info.
I am quite sure that the content in web-page-X is correct. The reason is that I had published it under a different web page name (like web-page-X-TEST.htm), and it could be published without any problem, and it also worked fine.
I have run out of ideas. Please help. Thanks.
Jay Chan
In Folders view, right-click the file that is not published, and then click Don't Publish to cancel the selection. If that doesn't work, here are some other troubleshooting tips which may help:
Web site changes are not visible on the destination Web server in FrontPage 2003 or in SharePoint Designer 2007

Adding ajaxControlToolKit to visual studio 2010

When trying to add the AjaxControlToolkit.dll file I am getting this message:
"Security Warning: This file is possibly downloaded from a network location, and it can potentially harm your computer. Only load assemblies from publisher you trust.
Do you want to load it anyway ?
"
I chose YES, and although the ajax controlls do not add to my tab.
What should I do ?
I just download the Ajax. So you might downloading it form not trusted site. Try, ajaxcontroltoolkit.codeplex.com and you go there go to downloads and choose either the first one which is Ajax Control Toolkit 4 or whatever you need. Let me know if you need any help or if you face any thing.
Try to add the AjaxControlToolkit using NuGet. See the official Codeplex page for instructions.
Adding a DLL does not necessary result in adding Controls to the toolbar. You can specificy in the settings dialog of the toolbar if controls from perticular assembly should be shown.

Is my Visual Studio project a web application or a web site?

First of all, when to use what and the overall differences between them has already been answered before. But I couldn't find an answer to this question:
Where can I check if my Visual Studio project is a Web Application or a Web Site?
The easiest way to differentiate between Web Site and Web Application is to look at the project's icons.
Web Site
has an icon without the used language
displays its physical root path
does not have a Properties folder
Web Application
has an icon including the used language
displays the project's name
has a Properties folder
To find out more about the technical differences between them ...
ASP.NET Web Site or ASP.NET Web Application?
Personally, one tell tale sign for me is whether the project folder actually contains a project file, or not.
You can see the icons differ slightly in VS - a web application has a layered world->docs->language icon and a web site just consists of world->docs.
Also, once opened within VS, right-clicking will display Properties and Property Pages for web applications and web sites respectively; further, on clicking this option you will be greeted with a dialog for the former and MDI tabbed form for the latter - the latter also exposes more functionality to control pre and post build steps and so forth.
A a web application will also display Properties and References special folders as part of the project tree in the Solution Explorer, whereas a web site does not necessarily; unless manually created for some reason (but they still won't be special - web sites use the bin folder for their references).
I recently found out (painfully) that web applications do not support Profiles which is not fun. Web sites however do support them and make life much easier. I noticed here people saying there are no major differences. This one is quite major and can make your life difficult if you select to make a web application instead of a web site.
Web application and Web Site are VS templates, nothing more. I doubt you will find this information directly somewhere in project. You can try to go through template differences list and guess how this particular project was created.
For Web Site project, once run (F5) you can change the code in the code-behind, the solution will allow it and it will compile on the fly when saved.
A Web Application project, however, will not allow this. This is the simplest way of being able to tell between the two.

Resources