How to execute an exe or a file in local machine using a website or html (like clone in windows in github) - asp.net

These are my requirements
How to open an pdf file which is located in my local machine using html page?
How to execute an exe file which is loacted in my local machine using a website?
This is like what github does when we do clone in windows option.
I need to implement exact same operation . I have a button and when I click that it need to run an application.
Thanks in advance.

You installed GitHub for Windows on your computer. And this installation registered the protocol github-windows: with the GitHub for Windows executable as handler. Nothing special going on here.

The only chance I see is to register your own URL scheme (as you said myapp-pdf: or something like it).
Then you can redirect (or open a new window) to a URL with your custom scheme and the browser should start your application giving you the URL as a command line parameter.

Create custom Url Schema and Map to the application
I just explain some thing I got after your inputs.
As all guys mentioned above, I need to generate a url schema for my application
I need to register the schema and application path to be executed in Windows registry. This need to handle during the installation .
http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx
This link will show how to add the particular schema in windows registry and we can specify the application to be executed like mailto: for Outlook.
Thanks for SO to provide the details from here.
how do I create my own URL protocol? (e.g. so://...)
Pros
Need to check about the security issues which may occur if we are using this approach.

Related

ASP.NET app cannot see files

I have an ASP.NET web app (VS 2017 Framework 4.5) that works fine in development. When I deploy to the web server and try to reference a file like this:
PdfBitmap tiffImage = new PdfBitmap(item.TIFPageLocation);
It returns a "Can't find file error". I even set up an if File.Exists() test and had the same result.
The file is a reference to another server like this: \\myserver\myvolume1\00\12\7A\00127A90.TIF.
When I run this path on the web server in WinExplorer it finds and open the TIF image in the default viewer. However the web app cannot see it for some reason.
This is likely some permissions issue but I'm not sure where.
Any ideas?
Thanks
Carl
Yes, this is likely a permissions issue. Your web app will probably be running under an account that has limited rights (almost certainly without the rights to access anything on the domain).
You either need to:
a) elevate their rights (be very careful with this)
b) run your site under a new user context created specifically for this site with rights to reach the other server
c) put your images somewhere easier to access.
Check your folder permission it should not have read access cross check that it's worked for me
It was the account the app pool identity was associated with. That need to be set properly.

SVN info from ASP.NET : 'Can't determine the user's config path'

Got an ASP.NET site which I wish to perform an SVN info call from.
My understanding is this error message appears when a user hasn't yet done their basic setup to use SVN. Specifically there is a folder a few steps under AppData named Subversion which when not present and properly configured, shows the aforementioned message.
The ASP.NET site is running under the account "NetworkService" whose AppData folder I cannot find. I was planning to copy & paste the Subversion folder, as it's not easy to do an actual log in as NetworkService.
How can I proceed using NetworkService so that the "svn info" can also proceed?
Thanks in advance--
FYI: Using SharpSvn as a wrapper. Doubt that matters, but there you go
add this line before you authenticate and or perform any svn event.
client.LoadConfiguration(Path.Combine(Path.GetTempPath(), "Svn"), true);

Issue in webdav on mac machine

A user with permission to create folders and components is not able to copy and paste items through WebDAV. This User is using Mac OS X Lion. The error he gets is that he does not have read and write permissions. Is there any resolution?
The WebDAV Connector is enabled by default server-side per the SDLLiveContent documentation at least for SDL Tridion 2011.
Only valid items are allowed via WebDAV which includes binaries (multimedia in Tridion), .xml components, and other types.
It seems like the user doesn't have permissions to read and write for a given folder. You can confirm by having them attempt creating folders or components in the same folder in the Content Manager Explorer (CME).
Is it possible that the Mac does not authenticate properly to Windows. In this case, you should be able to see the failed connections in your server logs. Is this user (or any other Mac user) able to use webdav successfully in any other folders?
As it's been suggested already, you will have to do some detective work to determine what exactly is failing. Tridion permissions do not change based on the client you use, so if they work from one client, they must work from another (excluding authentication issues here).
Go to your Windows Event Viewer, Tridion Content Manager log, check for error messages written to it when you try to copy content from the mac.
Post the exact error message you're getting. I doubt that Tridion is telling you "user is don't have read and write access"
Bottom line, if it works from Windows and not Mac, the issue is not with the WebDav server, but with the WebDav Client.
I also fail to see the programming question on this one...
What version of Tridion are you using? First action which you should do is to check Event Log for error messages (it was already suggested by Peter Kjaer), if you don't have anything there you can try to enable webdav debug logging by modifying cc_crtd_def.xml file which is situated in Tridion\webdav\WebDAVcartridges\Default\ folder. You should change loglevel property (as far as I remember it should be 4 for debug). And then there should be a log file created in the same folder or in webdav folder. You can try to find exact error message in this log file and post it here.

How do I download the javascript library for mapstraction v2?

I am setting up a map on a drupal website using the mapstraction module. I am planning to use the 6.x-2.x-dev development branch of mapstraction because I need some of its additional functionality.
In the instructions for installing the module, it says to download the mapstraction v2 library from mapstraction.com Navigating through their site, I found this page:
code.google.com/p/mapstraction/source/checkout which tells you:
Command-line access
Use this command to anonymously check out the latest project source code:
'# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://mapstraction.googlecode.com/svn/trunk/ mapstraction-read-only
I don't understand what command-line access is? I've tried pasting mapstraction.googlecode.com/svn/trunk/ into my browser, and I get a whole directory listing. Do I download each of these files? How do I know what is actually the mapstraction v2 library? Am I going about accessing the javascript library in the wrong way?
They moved to git hub.
You can now just download the zip file from here without a client installed
https://github.com/mapstraction/mxn/downloads
What you need is a Subversion Client. The Apache project maintains a list where you should be able to find a client for your operating system. Once you have a client, you will have to perform the "Checkout" function on the url provided by Google Code. Once you have the directory downloaded by the SVN client, you can look at the examples for proper usage and file inclusion.

Problem with workflow on SharePoint email enabled document library

SO ... here is the scenario ... i have a workflow on a document library that copies a file to a windows directory ... this workflow is set to be started at the time when a new item is added to the document library ... so everything works fine when you are manually uploading files to the doc library ... but the problem occurs when we use emails to populate the doc library instead of the manual uploading of files.
When an email is received ... the workflow starts successfully and runs properly (i have kept workflow history entries to check every section of code is being executed or not) ... the workflow stops when the section where the file is being copied to the windows folder is reached.
I basically think this is a problem with the permissions or access issues. Because when we upload the file manually (i.e. from doc library > upload) everything works fine. But maybe there is some other permission set which is used while an email is received by the doc library ... i have tried by assigning permissions to "Everyone" on the windows folder ... but no luck...
Can someone let me know which windows user account is used when an email is received by a document library? (i think its the IIS default account - but isnt it included in Everyone?? )
One solution which i can devise in my mind is that for the file transfer to the windows folder i should use temporary impersonation for the specific code segment (which writes the doc library file to windows folder) but any suggestions are welcome.
P.S. I dont have access to the server right now so i can only devise approaches in my mind ... cant test them right nw... so it would be good to have all suggestions u have so that once i get the access i can try all stuff :D
This is a well known situation. The system does not know who sent the email so it cannot impersonate a user it has no knowledge about.
Depending on which version of SharePoint you are running, the workflow may not start at all or it may start under the account that published the workflow.
For details see this Microsoft Support Article.

Resources