Click here to Skip to main content
14,699,613 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi sir,
I create one website, which plays audio file in gridview , i store that audio files in the server d drive of\Recording folder . If i run my application, it is asking for usename and password to display the audio file in gridview.

[Note: If i run the website having gridview containing audio files, it is asking for authentication, how to remove that authentication. I stored the audio files in another machine, so it is asking for authenticatin everytime i run the code]

I attached the screenshot and code for your reference. Kindly give me the solution for this problem.

	<appsettings />
		<add name="ConnectionString" connectionstring="Data Source=localhost;user id=sa;password=god;Integrated Security=false;Initial Catalog=checking" providername="System.Data.SqlClient" />
		<compilation debug="true">
		<authentication mode="Forms">
			<forms loginUrl="~/Login.aspx" timeout="8000"></forms>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
            <asp:BoundField DataField="CalledDate" HeaderText="CalledDate" />
             <asp:BoundField DataField="Callerid" HeaderText="Callerid" />
              <asp:BoundField DataField="StartDate" HeaderText="StartDate" />
               <asp:BoundField DataField="EndDate" HeaderText="EndDate" />
                <asp:BoundField DataField="Duration" HeaderText="Duration" />
                  <asp:BoundField DataField="filename3" HeaderText="filename3" />

                  <asp:TemplateField HeaderText="PLAY">
                                           <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="45" width="75"
                                                <param name="AutoStart" value="0" />     
                                                <param name="FileName" value="<%# Eval("filename3") %>" />
                                        <itemstyle wrap="True" />
Updated 10-Oct-13 2:51am
Hemant Singh Rautela 10-Oct-13 7:49am
I think it all about file permission, As you uploaded audio file in a folder so it is not sharable online. For that you have to upload audio/video or any file to your website folder...
OR you can make a subdomain where you can store your files...
ZurdoDev 10-Oct-13 7:51am
If you want to remove authentication just add the EVERYONE account and grant full control. However, that's a terrible idea.
Prabu Spark 10-Oct-13 8:12am
I tried to give everyone permission but still getting the problem.
Prabu Spark 10-Oct-13 8:13am
i cant able to store that file in website folder, because it is accessed by another application to store the audio files
Hemant Singh Rautela 10-Oct-13 8:36am
The problem is that in your path --

Because it is a url not exact location of path of your audio file,
this url point to your hosted website not to your server hardisk folder location...

You have to map the path of your audio file....
Madhu Nair 10-Oct-13 23:58pm
In which version of IIS are you hosting
Prabu Spark 11-Oct-13 1:14am
I am using IIS 5.1 and OS is windows xp

1 solution

Check this link it will help[^]

Do the changes mentioned in the site to your IIS Website folder

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900