I have a(n) (MDI) Windows Form application. It contains two forms. One form (Measured data) controls an engine, another form (laboratory) should show my asp.net web site that has various assignments for the user to do.
How can I show the asp.net default page in that laboratory form? I'm using awesomium to make a browsing window in my laboratory form.
Doing the following
webView.LoadURL("file:///D:/school/4e%20jaar/Erasmus/ErasmusProject/Laboratory/deault.aspx");
gives an error. Probably because the asp.net site isn't online. but how can I run the site so I can see the default.aspx page?
I have on solution with three projects
ErasmusProject
ASP.NET website
SIMOclasses
SIMOForm
The problem is you cannot execute aspx files with file:/// path.
You have to execute on IIS.
So first thing you have to do setup iis if you didnt, create new web site (or use Default Web Site) to execute your aspx files, than change your link file:/// to http://localhost or something.
The URL you've specified looks like its accessing the raw file via the file system. i.e. file:///D:/.../default.aspx.
(You've also misspelt 'default' in your question!)
Can you access that URL from a browser (e.g. IE, Firefox, etc) and see the content you want? I suspect you can't and that you're missing the webserver that is compiling and serving the .aspx pages.
You should host your website first :
WebDev.WebServer /port:9999 /path:"C:\Projects\MyWebSite"
Related
I have ASP.NET WebApi(MVC) application. On the site I need to show images. This images located on a separate server in the local network. I've tried the following:
<img src='file://///server_name/...'>
I tried various src addresses and only the one worked, but only in the IE, I got error in the Chrome and in the Firefox. I know it's security limitations.
And, I have question, What is best approach to get images from the separate server? I have WCF applciation also on main server. May be there are exist some way or may be to write console application(or another one web applciation) and host it on the images server, and it's applciation will serve http requesst from my main site? The perfomance is main goal for me.
I can't move images because there are hundreds terabytes. And I don't want to use ASP.NET Impersonation.
Map a Virtual Directory in IIS Manager. More info here.
And then reference the image:
<img src='/MyVirtualDirectory/photo.jpg'>
I created a sharepoint application in which I added a web app item , but the problem i didn't find the default.aspx page
Once you have the web application, you need at least a site collection to be able to navigate to. Once you create a site collection, every site in it (including the root site) will have a page called Home.aspx - that's the default one for SharePoint, not default.aspx - which you can browse. Also by default, navigating to a site's URL without a page name in the URL will lead you to Home.aspx.
Edit, to answer OP's comment:
i created a new web part in visual studio in order to deploy it in my Sharepoint site. In visual studio , i created an empty sharepoint project in which i added a web part to it , the problem i didn't find the default.aspx page in the project that i created
Web part and visual web part projects don't include pages. You may include a page in a module if you wish, but you will have to create it yourself.
Also, visual web parts are more like user controls than ASP.NET pages. You create these to add to web part zones pages. If you want to deploy pages, you might want to choose another project type.
I have created asp.net application and hosted on facebook.
but i cannot refer the javascript files .
they are referred in aspx pages as "Scripts/Jquey.js"
but while rendering application page in facebook.
it tries to look for.
url/page.aspx/Scripts/Jquery.js
which it cant find.
how to overcome this
If your path is relative to the root you should include the tilde, otherwise it will just be treated as relative to the page itself i.e. ~/Scripts/Jquery.js.
I am trying to write and application on windows where my application shud be prompted to open thru a browser link. how can I do that?
I don't know about second life, but I would register an file extension (like .MyApplication) with my application and create links to a .MyApplication-file on the web site. You an also encode special startup parameters inside that little file.
I just need to be able to open a .NET app (click once) from within an ASP.NET web page, and pass 2 string parameter to the app.
How can I do this? Any example please, with any method to do it. Thank you in advance.
This article explains how to retrieve the parameters from the querystring used to call the ClickOnce app. That should help you to figure out how to compose the URL, along with its querystring containing the parameters you want to send.
You could associate your application with a file extension and then simple generate a text file with your parameters from the web application with this extension and that would be opened by your client application.
Edit: If your click once application is deployed from a web site you could just link to that url. Depending on the click once settings the app could be started from the client if already installed.
There are two ways to deploy a click once app - so it can be launched from the start menu, and so it can be launched from a URL. Assuming you have set the app up as the URL-started one, just have a link on any ASP.NET page (or could be pure html, doesn't matter) to the click once app's URL. When the user clicks it their browser, IIS, and their local copy of Windows will all do the work to get the app launched.