Is there any feature is providing the microsoft teams to load static web pages(html/aspx) in browser - asp.net

I am trying to upload the html file and aspx file in teams. once it is loaded then get the copy of files address
and i am going to load that copied path url in browser but it is not showing web content which i design like web page.
in browser (html/aspx) files are downloading. If i am trying to load apsx file in browser it was showing like error(Something went wrong File Not Found),
so want i like is that is there any feature to load in browser?

Thanks for your detailed explanation.
First of all, Teams does not host any html or aspx file itself. So you can not upload a file and use the URL to render web page in browser. The file URL is a link to that uploaded file location. That's the reason the file is getting downloaded in browser.
Secondly, it is other way round. You can run your website in any other server and use that URL to configure a tab in MS Teams.
Please go through these links
What can Teams apps do?
How do tabs work?

Related

Rooted Path and FileUpload Control

I know it's been asked and I have read the posts and Googled this all day. Still nowhere near something that works. Using an .aspx page, I need to upload a .pdf file to a specific website. I'm doing development using VS2017 and VB.Net. The app will run on different websites. It needs to upload client files to a specific different website and path. Also, the file name of the uploaded file will not be the same as the local source file. Creating the new name is no problem.
Let's say a local file must be uploaded to a website at https://www.appfileserver.co.za/pdfdocs, but I'm on https://www.myownsite.com. So, when using FileUpload1.SaveAs(rootedpath) the path that goes in there must be the rooted path to the target. What would the rooted path look like for the example I provided?
FYI, I know the IP addresses, http paths and anything else I need to know because I control those sites. It would be great to do an FTP upload. I have done this many times from desktop apps. Unfortunately I'd need the full path to the local file. It seems there is no way a web page is allowed to get that full path, so FTP upload is out - or is there a way?
After battling for two days trying to FTP upload from website to website (which is not possible because server firewalls block this), I finally solved it. The solution was a simple one. I deployed the upload .aspx file on the target server then embedded that in an iframe on the client machine apps. The files are then uploaded one time to the right place. Simple and 100% effective. Hopefully somebody see's this and understands it - so as to avoid the troubles I had.

Accessing WebDav from Server Link

I've downloaded the .Net Server and ajax library
We need to be able to edit documents directly from the WebDav Server.
I've succeeded doing so with the javascript code using MicrosoftOfficeEditDocument and JavaEditDocument
I'd like to be able to have in my pages a link as follows
\server\DAV\path\file
When I place a similar link like above, it doesn't open the file. When I copy link and place in windows run command, it opens
Is it possible to have direct links to webdav storage files for opening?
Also, Is there a planned solution for the jar file running in Chrome?
I've followed the instruction for https://java.com/en/download/faq/chrome.xml#npapichrome
This allows chrome to load the jar file, but They say they stop supporting.
To open a document from a web page your link must be HTTP or HTTPS, that is start with http://server/. It would not work with a network path.
In your case URL must look like http://server/DAV/path/file.ext

Force file download in a browser using ASP.Net MVC when the file is located on a different server without downloading it on my server first

Here's what I would like to accomplish:
I have a file stored in Windows Azure Blob Storage (or for that matter any file which is not on my web server but accessible via a URL).
I want to force download a file without actually downloading the file on my web server first i.e. browser should automatically fetch the file from this external URL and prompts the user to download it.
Possible Solutions Explored:
Here's what I have explored so far (and why they won't work):
Using something like FileContentResult as described here Returning a file to View/Download in ASP.NET MVC to download the file. This solution would require me to fetch the contents on my server and then stream from my server to the browser. For this reason this solution won't work.
Using HTML 5 download attribute: HTML 5 download attribute would have worked perfectly fine however the problem is that while it is really a very neat solution, it is not supported in all browsers.
Changing the file's content type: Another thing I could do (at least for the files that I own) to change the content type property of the file to something that the browser wouldn't understand and thus would be forced to download the file. This might work in some browsers however not in all as IE is smart enough to go beyond the content type and sees the file's content to determine the content type. Furthermore if I don't own the files, then I won't have access to changing the content type of the file.
Simply put, in my controller action I should be able to specify the URL of the file and somehow browser should force download the file.
Is this something which can be accomplished? If yes, then any ideas how I could accomplish this?
Simply put, in my controller action I should be able to specify the URL of the file and somehow browser should force download the file [without exposing the URL of the file to the client].
You can't. If the final URL is to remain hidden, your server must serve the data, so your server must download the file from the URL.
Your client can't download a file it can't get the URL to.
You can create file transfer WCF service (REST) which will stream your content from blob storage or from other sources through your file managers to client browser directly by URL.
https://{service}/FileTransfer/DownloadFile/{id, synonym, filename etc}
Blob path won't be exposed, web application will be free from file transfer issues.

browser Does not open 'Save file' dialog box

I have uploaded a file on server and given a link to that file (test.txt file say) in my asp.net page. when i click on this link, it opens the content of that text file within the browser. But i want to open a dialog box so that user can save it on his local machine.
More over if file is dll type then it gives 404 error(file not found).
I tried it out in IE and Firefox and also its working fine on my local IIS but not on Server machine.
There are various ways suggested of forcing a file download to the browser in ASP.Net, and lots of examples ("asp.net file download"). Here's one: http://aspalliance.com/259
Basically, what you'l need to do is transfer the file to the browser 'in code' using Response.WriteFile() or something similar.
You'll also need to set a couple of response headers so that the browser knows this is a download as opposed to a file it should try and load: Content-Type and Content-Disposition
Personally, I'd rather zip a DLL if it is to be downloaded - after all a DLL is executable code, and could be blocked at the client side.

How do I download an msi file via an asp.net button?

So, I've created my wonderful winforms app that I want to unleash upon the world, and now I am trying to create a simple website to host some basic information and link to the setup file (msi installer file )....
I have a button on the asp.net page and the setup file setupApp.msi in same folder as the asp.net page. I am currently trying the following:
Response.Redirect("http://./SetupApp.msi");
But this best guess at what to do is not working. Is there something wrong with Mime types here? What do I need to put in the click event to allow users to download this file?
The path you are passing in to the method is not valid (there's no server name called ".").
You can pass in a relative path and it should work fine because ASP.NET will resolve the path:
Response.Redirect("SetupApp.msi")
Or if it's not in the same folder, try one of these:
Response.Redirect("../Downloads/SetupApp.msi")
Response.Redirect("~/SomeFolder/SetupApp.msi")
Keep in mind that you don't necessarily have to do the whole redirect at all. Instead of writing code in an ASPX file you could just have a link to your MSI:
Download my app!

Resources