|
Hi,
I am trying to load an SWF flash file in an ASP.NET page. embed URL is pointing to the file in my D:\ drive.
Can you please tell me whats wrong in the below code? Movie not loaded message is coming.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="980" height="634">
<param name="movie" value="video/D:\Articulate\story.swf" />
<param name="quality" value="high" />
<embed src="video/D:\Articulate\story.swf" width="”980" height="634" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" wmode="transparent" />
</object>
Thank You
Suresh Katari
|
|
|
|
|
You're doing it wrong. Remove the Video/ before the path.
You should not use absolute path. Use relative path. Save the swf file in same path where you have the html file.
Check this for simple example. HTML - Plug-ins[^]
|
|
|
|
|
Thank you raja. As you mentioned "video/" is wrong and absolute path is also wrong.
By my requirement is i have a set of SWF files which will be in a network shared folder and i have to access them in my asp.net page. So i must use absolute path in the src. Is this can be done? or i must copy all those SWF files to my web folder?
|
|
|
|
|
|
Understood. Thank you so much for your time.
|
|
|
|
|
Venturing into the Web API arena after years using WCF so!
If I have a service built on 4.51 serving up Json objects can that be consumed by a WPF client using 4.0
Is it reasonable to create a Web API service WITHOUT MVC, this will be consumed by various clients including MVC and WPF bit I want them in a separate projects.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I assume that the last statement meant to be a question...
It makes all the senses to separate common functionality from other layers. There is no technical problem to create pure WEB API projects (the only problem is that you will have to build it manually from scratch or by cleaning a project created by the wizard)...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Almost all examples are for 4.5(1) and include MVC, as I know very little about MVC I struggle to separate the them. One article I was working through requires the project to be published to test it, painful.
What I am really looking for is an example of a plain Web API project consumed by a WPF client.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
There is a ways to create an WEB API only project (in VS 2013), but I never checked it... Choose Empty ASP.NET Web Application, int the 'Add folders and core references for:' section choose WEB API...
If 4.5 does not fit you, you can open project properties and change target framework...(no idea what wrong with 4.5, I do use 4.5.2)
These two links may help you on how to access such a WEB API from WPF:
http://www.asp.net/web-api/overview/web-api-clients/calling-a-web-api-from-a-net-client[^]
Calling ASP.NET WebAPI using HttpClient[^]
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Hi all,
We recently upgraded our web application from Windows server 2003 to Windows server 2008. Everything works good except that the Gridview footer controls' id are generating different. This is causing some external javascript failure. The Gridview code is:
<asp:UpdatePanel ID="UPSposors" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="grvSponsors" Visible="true" AutoGenerateColumns="false" HeaderStyle-Font-Names="Verdana"
HeaderStyle-Font-Size="9pt" PageSize="5" ShowFooter="true" TabIndex="9" runat="server"
OnRowCancelingEdit="grvSponsors_RowCancelingEdit" OnRowEditing="grvSponsors_RowEditing"
OnRowUpdating="grvSponsors_RowUpdating">
<Columns>
<asp:TemplateField HeaderStyle-Width="100px" SortExpression="SponsorType" HeaderText="Contact Type">
<EditItemTemplate>
<asp:DropDownList ID="ddlEditSponsorType" runat="server" Width="99px" Font-Names="Verdana"
Font-Size="8pt">
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblSponsor" runat="server" Text='<%# Bind("SponsorType") %>' Font-Names="Verdana"
Font-Size="8pt" /></a>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddlAddSponsorType" runat="server" Width="99px" Font-Names="Verdana"
Font-Size="8pt" TabIndex="13">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfvAddSponsor" runat="server" Display="Dynamic" ErrorMessage="Business Contact-Contact Type is required."
InitialValue="" Enabled="false" ControlToValidate="ddlAddSponsorType"><strong>!</strong></asp:RequiredFieldValidator>
</FooterTemplate>
</asp:TemplateField>
<asp:CommandField FooterText="<U><a style='cursor:hand;font-family:Verdana;font-size:8pt;padding:2px;' TabIndex ='14' id='aAdd' onclick='TriggerAddSponsor();' >Save</a></U>"
ShowDeleteButton="true" ShowEditButton="true" HeaderStyle-Width="125px" CausesValidation="false"
ControlStyle-Font-Names="Verdana" ControlStyle-Font-Size="8pt" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
The generated HTML control in Windows Server 2003 is:
<td>
<select name="tcGeneral$tpGeneral$grvSponsors$ctl03$ddlAddSponsorType" id="tcGeneral_tpGeneral_grvSponsors_ctl03_ddlAddSponsorType" tabindex="13" style="font-family:Verdana;font-size:8pt;width:99px;">
<option value="">Select</option>
<option value="BUS">Business</option>
<option value="IT">IT</option>
<option value="SP">Sponsor</option>
</select>
<span id="tcGeneral_tpGeneral_grvSponsors_ctl03_rfvAddSponsor" style="color:Red;display:none;"><strong>!</strong></span>
</td>
The generated HTML control in Windows Server 2008 is:
<td>
<select name="tcGeneral$tpGeneral$grvSponsors$ctl03$ddlAddSponsorType" id="tcGeneral_tpGeneral_grvSponsors_ddlAddSponsorType" tabindex="13" style="font-family:Verdana;font-size:8pt;width:99px;">
<option value="">Select</option>
<option value="BUS">Business</option>
<option value="IT">IT</option>
<option value="SP">Sponsor</option>
</select>
<span id="tcGeneral_tpGeneral_grvSponsors_rfvAddSponsor" style="display:none;"><strong>!</strong></span>
</td>
As you can see the id generated for W2K3 server has "ctl03" in it but the W2K8 does not. This is causing our javascripts to fail. On my laptop running IIS7.5 the id has "ctl03" its just on the windows server 2008 that is missing it. Am I missing some kind of setting or deployment?
Thank you for any help in advance,
AJ
|
|
|
|
|
|
Thank you Richard. That solved the problem. I did set the framework to 4.0 however on my and other developer's localhost the client id was generating as it always did. Only when we deployed it to Windows 2008 server that we ran into this issue. Any idea why the client id is generating as "AutoID" on local machines but not on the W2K8 server?
Thank you again for your help.
AJ
|
|
|
|
|
That's odd. Are you sure your local copy was running under IIS, and not the Visual Studio web-server?
Also, have a look at the web.config files; it's possible that your local file was upgraded to .NET 4.0 and had the application-wide default set to AutoID , whereas the deployed file didn't have that setting.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
My local copy is running under VS Web-server but I thought since the project is set to target Framework 4 (in project properties -> Compile -> Advanced Compiler Settings) that it would behave same way as it would on the server running under IIS.
Why does web-server not follow the same rule/logic as IIS when it comes to targeting .net framework.
Thanks for your input.
AJ
|
|
|
|
|
With those settings, it should be using .NET 4 for your local copy.
How about the web.config file? Are there any differences between your local copy and the one on the server?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You are right. Here is what I found in web config of the developers:
<pages controlrenderingcompatibilityversion="3.5" clientidmode="AutoID">
However this was not updated in the web configs of the servers in all environments.
Good call,
Thanks you.
|
|
|
|
|
When I load my page it shows error:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'UserInfoaa' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 176: }
Line 177:
Line 178: public virtual UserInfoaa UserInfoaa {
Line 179: get {
Line 180: return ((UserInfoaa)(this.GetPropertyValue("UserInfoaa")));
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\c367d58a\7b408850\App_Code.d_07k52h.1.cs Line: 178
My default.aspx Code is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Web.Profile;
using System.Text;
namespace WebApplication2
{
public partial class Dfault : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void submit_Click(object sender, EventArgs e)
{
MembershipCreateStatus createStatus;
MembershipUser newUser = Membership.CreateUser(username.Text, password.Text, email.Text, null, null, true, out createStatus);
saveprofile();
}
public void saveprofile()
{
ProfileCommonaa Profile = new ProfileCommonaa();
Profile.UserInfoaa.Name = name.Text;
Profile.Save();
}
}
}
My UserInfoaa class code is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebApplication2
{
[Serializable()]
public class UserInfoaa
{
#region variables
private string name;
#endregion variables
#region Properties
public string Name
{
get { return name; }
set { name = value; }
}
#endregion Properties
#region Constructors
public UserInfoaa()
{
}
public UserInfoaa(string _name)
{
name = _name;
}
#endregion Constructors
}
}
Class1 for ProfileCommonaa is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Profile;
using System.Text;
using System.Web.Security;
using System.Web.UI;
namespace WebApplication2
{
public class ProfileCommon : System.Web.Profile.ProfileBase
{
public virtual UserInfoaa UserInfoaa
{
get
{
return ((UserInfoaa)(this.GetPropertyValue("UserInfoaa")));
}
set
{
this.SetPropertyValue("UserInfoaa", value);
}
}
public virtual ProfileCommonaa GetProfileaa(string username)
{
return ((ProfileCommonaa)(ProfileBase.Create(username)));
}
}
}
Please help! thanks in advance
modified 7-Jul-14 0:31am.
|
|
|
|
|
1. do not repost your questions all over the forums - pick the best fitting and stay with it!
2. remove all the unrelated code - it is extremely hard to follow such long listing
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Please let me know the solution I am new in asp.net
|
|
|
|
|
That stuff about ProfileCommonaa is not defining a class ... you might want to look closer at that
|
|
|
|
|
V.sory this mistake i have done at the time of posting this question.
|
|
|
|
|
I'm getting this error:
An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.
Here is my Entity Framework connection string:
<add name="EFDataModelEntities2" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=HOLDORF-PC\SQL_2008_R2;initial catalog=EFDataModel;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
And here is my Model connections:
<EntityContainer Name="EFDataModelEntities2" annotation:LazyLoadingEnabled="true">
<EntityContainerMapping StorageEntityContainer="EFDataModelModelStoreContainer" CdmEntityContainer="EFDataModelEntities2">
Thannks,
Steve Holdorf
|
|
|
|
|
I just looked at the error details and this is what I'm getting:
{"The provider did not return a ProviderManifestToken string."}
I am hitting Google as well.
As always, thanks you guys!
modified 5-Jul-14 16:56pm.
|
|
|
|
|
Also are my connection strings:
SQL
<add name="DbConnectionString" connectionString="Data Source=HOLDORF-PC\\SQL_2008_R2;Initial Catalog=EFDataModel; Integrated Security=True" providerName="System.Data.SqlClient" />
EF
<add name="EFDataModelEntities2" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=HOLDORF-PC\SQL_2008_R2;initial catalog=EFDataModel;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
|
|
|
|
Seems alright...
Have test your connection visual studio sql manager
Sankarsan Parida
|
|
|
|