I am using the Publish functionality to deploy my Silverlight webapplication. I am not hosting it in an aspx page, just a plain html page. I do not need all the extra aps.net stuff. When I publish it, it wants to add a bin folder, and it wants to compile the site it seems. Is there any way I can disable this? I just want my index.html file together with some xml files copied to the ftp server of my hosting provider.
Related
I'm working on an ASP.NET MVC application with an AngularJS front-end and it's working great when running from visual studio/iis express, but not so great when I try to publish it so it's accessible to other users (e.g. navigating to http://server/application in a browser). I have IIS configured on server so that http://server/application points to an "application" folder that is structured as:
application
app
areas
foundation
main
layout
layout.html
bin
Content
fonts
Scripts
Templates
Views
Shared
_Layout.cshtml
Index.cshtml
Logs
Global.asax
web.config
The initial page, Index.cshtml (under Views/Shared/), gets loaded but includes this:
<div ng-include="'app/main/layout/layout.html'"></div>
which returns a 500.24 - Internal Server Error.
If I change the ng-include to:
<div ng-include="'application/app/main/layout/layout.html'"></div>
then the published application works but running it from visual studio/iis express returns a 404.0 - Not Found response when trying to load that layout.html file, I'm assuming because there's no parent "application" folder when it's running using iisexpress.
I did manage to get the published application working at one point by copying the contents of the published application folder to server's C:\inetpub\wwwroot folder but that doesn't seem like a proper solution, so what's the best way to inform Angular to look in the correct location for this ng-include?
What I ended up doing is adding an application path variable in my web.config file and prefixing all my ng-include or other urls with the application path, so they looked like
<div ng-include="'application/app/main/layout/layout.html'"></div>
and then updating my project Web properties to the following:
so that whether I publish it or run it through Visual Studio, it's running under the 'application' folder and looking for the html files in the appropriate location.
Throughout the internet documentation for DotNetNuke is far and wide, this in itself is quite useful. However one hurdle exist and I can't appear to solve it. How do you do DotNetNuke Module development without Chris Hammond's Template?
This template has become so widely accepted and utilizes that no other documentation exists.
I've already accomplished the following:
Configured SQL Server Database
Configured Internet Information System (Bindings)
Modified the System32 Host File (For local IP to reflect web-site Name)
Installed the MSBuild Community Task
Installed DotNetNuke Instance
Everything is installed and in place, now I have open DotNetNuke's Site into Visual Studio and configure my project to actually build the module.
I figured if I reference the .dll for DotNetNuke that should suffice, but the Web Forms Project loads all this extra garbage that impacts the development.
Could someone outline the proper way to build your environment from scratch without the template for Visual Studio?
Setup a DNN Development environment, even if you aren't using my templates I recommend the same dev environment approach http://www.christoc.com/Tutorials/All-Tutorials/aid/1
Using Visual Studio create a new Web Application Project, with a location of /desktopmodules/ in your DNN dev environment. (Follow Step 9 of this tutorial http://www.christoc.com/Tutorials/All-Tutorials/aid/4)
Remove everything that Visual Studio puts into the WAP project (folders, web.config, etc).
Add an assembly reference to DotNetNuke.dll in the website's BIN folder
Right click on the Project properties and set properties on the project to have the Build location be the website's BIN folder (../../bin)
Change the web tab have the following properties set
IISUrl:http://dnndev.me/desktopmodules/MODULENAME
OverrideIISAppRootUrl:True
IIS App Root URL:http://dnndev.me
Add an ASCX file to your project. (view.ascx)
Change the BASE class for the ASCX file to inherit from PortalModuleBase
Compile your module
Register the module with DNN (host/extensions)
Add the Module to a page.
TL;DR
Save yourself the trouble of steps 2-8 and 10 by using the template.
Honestly, the best bet if you want is use Chris's template as a base, and edit it to get it as plain as you want it to be.
I have a plain template that only has the MSBuild configuration in it as I don't even have local copies of DNN on any of my development machines.
The key magic pieces of his template is the MSBuild stuff, and I go one step further and use NuGet to manage the packages/references to DNN that way I don't have any other DNN files locally.
This is what I used to do BEFORE I started using a template. Very similar to #bdukes but rather than developing in the DesktopModules folder, I like to keep my modules in their own projects outside DNN.
In Visual Studio, select File -> New -> Project.
Select '.NET Framework 4' from the version dropdown and C# -> Web from the tree pane on the left then 'ASP.NET Empty Web Application'.
Delete the web.config file.
Add a reference to the DotNetNuke dll.
Add a new user control to the project, this will be your main view for your project.
Make sure the user control inherits from DotNetNuke.Entities.Modules.PortalModuleBase instead of System.Web.UI.UserControl.
Build the project in Visual Studio.
Right click on the Project in Visual Studio and select 'Open Folder in File Explorer'.
Copy the DLL of your project into the bin folder of your dotnetnuke instance.
Paste the project folder in your DotNetNuke instances DesktopModules folder.
Delete all files except the user control you created from the folder you pasted under DesktopModules.
Login into your DNN instance.
Navigate to Host -> Extensions -> Create New Module.
Select 'Control' from the dropdown.
Select the module folder (not owner folder) you pasted in DesktopModules.
Give your module a name and tick the option 'Add Test Page'.
Click 'Create Module'.
You will then be taken to a test page with your new module running with only an empty user control. You can then add controls into the modules folder, rebuild and copy the new DLL into DNN's bin folder and you'll see the changes in DNN.
I would then go back to Host -> Extensions and click edit (the pencil) next to the newly created module. At the bottom of the page there is a 'Create Package' button. Follow the prompts until you're at the preview manifest file. Copy this as your modules manifest file and add it to your project.
Don't forget to add any new views, edits, settings controls to the module definitions and re-create the manifest. (Host -> Extensions and click edit (the pencil) next to the module -> Module Definitions heading)
I have a Silverlight app made in Visual Studio 2010 and I want to put it on a website but I don't have the slightest clue how.
I've looked at all the msdn documentation and they all mention a .xap file that is the file you use on the website but there is no .xap and I can't find out how to compile my code into a .xap file.
Also, when I run the App and look at the source in the browser, it has my code compiled into the .xap file, but there is no .xap file!
So my question is simply how do you go about getting a Silverlight app on a website because I've been trying for hours and I can't figure it out.
A sample html or aspx page is included when you create the solution. This is the page that the browser navigates to when you hit F5. You can take that page as a basic example of how to embed a Silverlight app in a page. You should find it in the project folder.
Silverlight projects are commonly built into a XAP file when you hit "Build" in VS. This file lives in the bin/Release or bin/Debug folder and basically contains your whole application.
Steps to create a silverlight application Hosted in a web site,
Select Silverlight Application Template while adding new project in VS2010
When you click Ok, ensure that Host the Silverlight application in a new web site is Checked.(It will create a new ASP.Net web application to host the Silverlight)
If you haven't checked the Host the Silverlight application in a new web site option, you can add a new ASP.Net Web application project and then go to its properties and select Silverlight Applications option in left pane. Then Click Add, select your Silverlight Application to be hosted and click ok. You are done now.
But If haven't selected the Silverlight Application Template, then you might have created a Silverlight Class Library. It wont generate any xap file. It just gives a dll. So you need to recreate a project as mentioned above.
I believe that in Silverlight whenever you create a project, right at the beginning, it will ask you if you want to create a web app automatically. If you chose yes, something like YOUR_PROJECT_NAME.web will be created, go into that folder, you will find a folder called ClientBin.
The .xap file will be inside that folder.
HTH
I'm new to WPF, and created a 1st simplistic WPF application that I want it to run in a webbrowser, IE or Fox.
1 - Within the Visual Studio project, I created a /Images folder with a few .jpg files
On the WPF xaml form I have 1 image and 1 button.
When application starts, the image displays /Images/img1.jpg
When User clicks the button the image must display /Images/img2.jpg
How can I force the VS publisher to include the Images folder? Apparently I can't see it in the ApplicationFiles ?
2 - Though I was able to program and run this small app on my local computer, I'm getting lost when it comes to deploying to my hosting ASP where I have a Windows hosting account that runs .NET 3.5!
From Microsoft WPF website they say I shall deploy 3 files:
"The Application Executable .exe
The Deployment Manifest .xbap
The application Manifest .manifest
The .xbap file contains the information that ClickOnce uses to deploy the application and has the .xbap extension."
But I can's see no .xbap files at all within the published stuff!!!
Any clue please?
To answer your first question:
The images will be embedded in the compiled application, so you will not see the images in the application files.
Note:
The build action of images added to your project is 'Resource' by default - leave this as is.
Do not use the resources tab in the Project properties window, just drop and drag the images into the Images folder in the solution explorer.
To help answer your second question:
Did you create the project as an WPF Browser Application?
In your .csproj file you should see the following:
<HostInBrowser>true</HostInBrowser>
<Install>False</Install>
<ApplicationExtension>.xbap</ApplicationExtension>
<TargetZone>Internet</TargetZone>
If not, just recreate the project as a WPF Browser Application and copy your files from the existing project to the new one.
How can I show folder and its subfolders from server to Silverlight application in TreeView?
You would need to add support for this on the server side. Either:
Add a web service that safely returns the folder and subfolders and files
Have the web page that the Silverlight plugin is in add this information into the HTML of the page (that can be read like an XML island) or the initParams of the object tag.
There is no way to do this in just the client.