1

Closed

AudioUpload App Not Compiling

description

Hey Guys,
I download the audioupload application located in the client folder and it doesn't compile. I have hss interlink installed, can you guys look into this issue?
Closed Mar 4, 2014 at 4:14 PM by ClipFlair
fixed, main change is at MainPage.xaml.cs of AudioUpload project, but took the opportunity to use VS2013's Organize [remove unused] and Sort Using clauses power command (some extension makes it available for a whole solution) to cleanup the default using clauses that Visual Studio adds when you make new C# files (and usually remain as garbage at the top of the file)

the reason of the change needed was that AudioLib has evolved - mainly used by the AudioRecorder control which the Captions/Revoicing component of ClipFlair Studio ([http://studio.clipflair.net]) uses

some value of AudioFormat type needed to be wrapped in an AudioFormatEx with new AudioFormatEx(...) before passing to the method that does PCM to Wav

btw, note that there is an issue on Macs, where the default at Silverlight seems to be recording at 24bits (floats) which then Silverlight can't play (only supports 8-bit and 16-bit WAVs). Needs some research on which recording formats it supports on Mac (to dump all available audio capture formats), but don't have a Mac available to test easily. If Mac only supports recording to 24-bit (I hope not), then some code is needed to convert 24-bit to 16-bit or 8-bit in memory after recording (both for from-memory playback and for WAV storage)

comments

Birbilis wrote Mar 4, 2014 at 10:00 AM

We don't currently use that code at http://ClipFlair.net (was for a test during the Alpha version), but will look into it later on today and let you know. Please remind if I forget

s3b4k wrote Mar 5, 2014 at 11:00 PM

Alright thanks alot for looking into it compiles fine now :). But i got another problem every time the upload2.UploadStreamAsync() is called it always finishes with a secruity error. Any idea about what this is. I am running locally the application.

s3b4k wrote Mar 6, 2014 at 12:02 AM

Alright good clipflair, I got everything working out, really appreciate the example project ;)

Birbilis wrote Mar 6, 2014 at 1:29 AM

at the root of the website where the Upload Handler of HSS Interlink is, there needs to be a client security policy file that allows Silverlight apps from all domains (or that have been loaded from specific domains) to access it

if you see the discussions at HSS codeplex forum it is mentioned at several places

if the XAP is server from the same domain where the Upload Handler is, then you don't need Silverlight policy file

however, see the following I have at README.TXT in that project:

change FILE_UPLOADER_STORAGE_URL string at MailPage.xaml.cs with your own hosting address or localhost URL instead of MYSERVER

if you want to change the name of the Uploads folder, make sure you also rename temp/Uploads folder and change the StoredFiles setting at Global.asax.cs accordingly

If running from IIS, need to give "IIS APPPOOL\DefaultAppPool" user (or whatever AppPool you're running the Web Application under at IIS) to Uploads and temp/Uploads folders
If you can't find AppPool related users in your system using the pattern "IIS APPPOOL\<AppPoolName>", see http://serverfault.com/questions/81165/how-to-assign-permissions-to-applicationpoolidentity-account for more info

Birbilis wrote Mar 6, 2014 at 1:33 AM

an example of a ClientAccessPolicy.xml that allows every Silverlight app to access resources on the server is:

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
    <policy>
        <allow-from http-request-headers="*">
            <domain uri="*"/>
        </allow-from>
        <grant-to>
            <resource path="/" include-subpaths="true"/>
        </grant-to>
    </policy>
</cross-domain-access>
</access-policy>

Birbilis wrote Mar 6, 2014 at 1:34 AM

Visual Studio 2013 has option at project properties to try project with IIS which usually solves any issues (VS2010 had internal web server that had various constraints)

else you can use Publish action on the web project and publish to your own server to then test manually

s3b4k wrote Mar 6, 2014 at 4:30 PM

Alright thanks Birbilis, I got it all sorted out much appreciate. Will be looking at your other projects.