Click here to Skip to main content
15,900,108 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 192.168.100.4\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.

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

Default.aspx
C#
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
        <columns>
            <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">
                                        <itemtemplate>
                                           <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="45" width="75"
                                                id="Object1">
                                                <param name="AutoStart" value="0" />     
                                                <param name="FileName" value="http://192.168.100.4//Recording//<%# Eval("filename3") %>" />
                                              
                                            </object>
                                        </itemtemplate>
                                        <itemstyle wrap="True" />
                                    
        </columns>
Posted
Updated 10-Oct-13 1:51am
v2
Comments
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...
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 -- http://192.168.100.4//Recording//

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....
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.

1 solution

Check this link it will help[^]

Do the changes mentioned in the site to your IIS Website folder
 
Share this answer
 
v2

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