Author Topic: BASS_StreamCreateFile always returns 0 when it is run run from IIS  (Read 85 times)

hasibul2363

  • Posts: 1
Hi,
I am using Bass.net library and trying to invoke StreamCreateFile. It works fine when I run my application in console mode. But it always returns 0 when I run it from IIS.
I have used following code

Code: [Select]
BassNet.Registration("abul.kasim@selise.ch", "......");
            Un4seen.Bass.Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            var stream = Un4seen.Bass.Bass.BASS_StreamCreateFile(@"Y:\HE_d0f880e1-4173-49e8-abcd-ab5830079f6b.mp3", 0, 0,BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_PRESCAN);

But it always returns 0 when it is hosted in IIS but from console app it works fine.

Expecting your help.
Thanks in advance.


Ian @ un4seen

  • Administrator
  • Posts: 20339
What is the error code? You can use BASS_ErrorGetCode to check that. If it's BASS_ERROR_INIT (8), that means the BASS_Init call failed; you could check the return value and error code from that call too.

Are you always creating "decoding channels", ie. using the BASS_STREAM_DECODE flag? If so, try using device=0 in the BASS_Init call for the "no sound" device.