Já postei essa pergunta em varios foruns e até agóra não tive resposta. Estou com metade do meu projeto da faculdade funcionando mas o que me barrou foi o carrinho de compras, no meu web.config utilizei o seguinte:
<anonymousIdentification enabled="true"/>
<profile defaultProvider="SQLProvider">
<providers>
<add name="SQLProvider" connectionStringName="StoreString" applicationName="/"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</providers>
<properties>
<add name="MemberName"/>
<add name="Name"/>
<add name="Address"/>
<add name="City"/>
<add name="State"/>
<add name="Country"/>
<add name="PostCode"/>
<add name="Email" allowAnonymous="true"/>
<add name="Cart" serializeAs="Binary" type="Store.Shopping" allowAnonymous="true"/>
</properties>
</profile>
E na minha ShopItem.aspx.cs não esta puxando o Profile dando essa menssagem : The name 'Profile' does not exist in current context.
Na minha ShopItem esta assim:
protected void btnAddToCart_Click(object sender, ImageClickEventArgs e)
{
double Price = double.Parse(((Label)DataList1.Controls[0].FindControl("Price")).Text);
string ProductName = ((Label)DataList1.Controls[0].FindControl("Title")).Text;
string PictureURL = ((Label)DataList1.Controls[0].FindControl("lblImage")).Text;
string CategoryId = ((Label)DataList1.Controls[0].FindControl("lblCategoryId")).Text;
int ProductID = int.Parse(Request.QueryString["ProductID"]);
if (Profile.Cart == null)
{
Profile.Cart = new Cart();
}
Profile.Cart.Insert(ProductID, Price, 1, ProductName, PictureURL);
Server.Transfer("Products.aspx?id= " + CategoryId);
}
}