Eğer işlem yaptığın SQL Server Instance' ında açmak (Restore) için belirttiğin veritabanı adında bir veritabanı zaten varsa ve açmak istediğin veritabanından farklı bir veritabanıysa (mesela senin oluşturmadığın bir db ise ve sana sadece bak dosyası gönderilmişse) bu hatayı alırsın.
sql server - [error] Error 3154: The backup set holds a backup of a database other than the existing database
Etiketler: bak , sql backup , sql restore
facebook app - asp.net facebook application links
http://www.alialtugkoca.com/arsiv/facebook-uygulama-gelistirme-1-gerekenler-onhazirlik/
http://www.marketing-ninja.com/asp-net/5-facebooknet-development-tips/
http://www.stevetrefethen.com/wiki/Facebook%20application%20development%20in%20ASP.NET.ashx?NoRedirect=1
http://www.stevetrefethen.com/blog/DevelopingFacebookApplicationsInCWithASPNET.aspx
Etiketler: asp.net facebook application
css - rounded border for images
.xxx ul a img
{
border: 3px solid #f6b900;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
Etiketler: css , img , rounded border
sql server 2008 - database publishing
Etiketler: database publishing , sql server 2008
web service - The test form is only available for requests from the local machine
<configuration>
<system.web>
<webServices>
<protocols>
<add name=”HttpGet”/>
<add name=”HttpPost”/>
</protocols>
</webServices>
</system.web>
</configuration>
Etiketler: web service
linq to sql - Type 'http://microsoft.com/wsdl/types/:char' is not declared
web service char alan içeren bir objeyi döndüremiyor.
char alanı varchar'a çevirdiğim halde, dbml'de değişmiyor. elle değiştirmek gerekiyor.
aynı şekilde wsdl'de de elle değişiklikler gerekebilir.
Etiketler: linq to sql , web service
web service - Cannot merge schemas with targetNamespace='http://tempuri.org/'. Several mismatched declarations were found: Schema item 'complexType' named 'Page'...
Cannot merge schemas with targetNamespace='http://tempuri.org/'. Several mismatched declarations were found: Schema item 'complexType' named 'Page' from namespace 'http://tempuri.org/'.
geçersiz:
[WebMethod]
public void Create(Page page, out string errors)
{
PageController controller = new PageController();
controller.Create(page, out errors);
}
geçerli:
[WebMethod]
public void Create(string title, out string errors)
{
PageController controller = new PageController();
var page = new Page();
page.Title = title;
controller.Create(page, out errors);
}
daha iyi bir çözüm:
[WebMethod]
public void Create(SerializableEntity
{
_controller.Create(page.Entity, out errors);
}
Parametre olarak Page'i (yani complextype'ı) kabul etmiyor.
Not: LinqSqlSerialization.dll
Etiketler: complextype , web service
web service - Use the MessageName property of the WebMethod custom attribute to specify unique message names for the methods
{
[WebMethod(MessageName = "GetItemById")]
public Item GetItem(int id)
{
...
}
[WebMethod(MessageName = "GetItemByUniqueTitle")]
public Item GetItem(string uniqueTitle)
{
...
}
}
Step 2: Set your webservice binding: ConformsTo = WsiProfiles.None
Etiketler: messagename , overload method , web service
web service - linq to sql & web service
public class IntertechWS : System.Web.Services.WebService
{
[WebMethod]
public SerializableEntity<Page> GetPage(int id)
{
PageController ctrl = new PageController();
Page page = ctrl.GetPage(id);
SerializableEntity<Page> entity = new SerializableEntity<Page>(page);
return entity;
//IntertechDBDataContext db = new IntertechDBDataContext();
//var page = db.Pages.SingleOrDefault<Page, SerializableEntity<Page>>(p => p.PageID == id);
//return page;
}
[WebMethod]
public List<SerializableEntity<Page>> GetSubPages(int id, int langId)
{
PageController ctrl = new PageController();
return ctrl.GetSubPages(id, langId).ToList<Page, SerializableEntity<Page>>();
//IntertechDBDataContext db = new IntertechDBDataContext();
//var pages = db.Pages.ToList<Page, SerializableEntity<Page>>();
//return pages;
}
}
Etiketler: linq to sql , web service
linq to sql - Make Entities Serializable (LINQ to SQL)
Etiketler: linq to sql , serialization
System.InvalidOperationException: A circular reference was detected while serializing an object of type
One of the important that things that you will likely have to do at one point or another with entity objects is serialize them. This could be for Web Services most commonly but could be for any sort of storage or transport scenario.
There are a number of pitfalls with this scenario however, primarily because LINQ to SQL will very likely generate circular references into your entity model from your data and XML Serialization will fail outright in that scenario. For example, say you have a customer and projects table and if you let LINQ generate the one to many relationship it will create Customer entity with a Projects property and a Project entity with a Customer property.
For code scenarios this is probably a good thing - you want to be able to see all Projects and filter that list in your code.
Unfortunately in a serialization scenario this doesn't work because you essentially have a circular reference - Customer ->Projects -> Customer. So we have a 1 -> Many and a 1 - 1 relationship going back to the original object here.
Etiketler: linq to sql , serialization
html - pre tag'i
$("#showCase2").showcase({ images: [{ url: "images/showcase_rik_1.jpg", description: "Imageset from flickr", link: "#" }, { url: "images/showcase_rik_2.jpg", description: "Just Perugia", link: "#" }, { url: "images/showcase_rik_3.jpg", description: "Anzio, winter sea", link: "#" }, { url: "images/showcase_rik_4.jpg", description: "Livorno, Piazza Grande", link: "#" }, { url: "images/showcase_rik_5.jpg", description: "Glacial", link: "#" }], width: "650px", height: "435px", animation: { autoCycle: false }, navigator: { position: "top-left", showNumber: true, orientation: "vertical", padding: "3px", item: { cssClass: "item3", selectedCssClass: "item3selected" } } });
js - png fix
http://jquery.andreaseberhard.de/pngFix/
denedim, fakat işe yaramadı =/
Etiketler: png fix
System.NotSupportedException: An attempt has been made to Attach or Add an entity that is not new, perhaps having been loaded from another DataContext
System.NotSupportedException: An attempt has been made to Attach or Add an entity that is not new, perhaps having been loaded from another DataContext. This is not supported.
You may have gotten this error when using LINQ to SQL. I personally hate this error, but surprisingly enough, out of 2 years of using LINQ to SQL, this is the first time I've gotten this (2 years later, I mean). This error happens in this scenario: imagine loading up an object Order. This object has a primary key relationship Customer, which you can access via:
Order.Customer
Under the scenes, the order class uses the EntityRef
order.Customer
This reference gets loaded from the context, using the value from CustomerKey. if you assign a new value to Order.CustomerKey as in:
order.CustomerKey = 3;
The LINQ entity notices that the Customer object (underlying EntityRef
order.Customer = this.DataContext.Customers.First(i => i.Key == 1);
You have to assign the reference to the Customer, and this instead updates the key, the reverse way around. I don't like this because this forces me to perform an additional data query, and in a business app this may reduce performance just to update a reference. I chose an alternate way. By adding a partial class for the order, I add a ClearCustomer method that does the following (note all LINQ types implement partial keyword, which means you can create another partial class to add additional methods).
public partial class Order ...
{
public void ClearCustomer()
{
_Customer = default(EntityRef
}
}
And now, calling this method before changing the assignment clears the customer, and I can make the change. A bit of a hack, but it works. Unfortunately, because again the EntityRef is internal to the class, the method has to be in the class definition (can't use a static helper class to do this, at least easily). To update the reference, I can now do:
order.ClearCustomer();
order.CustomerKey = 7;
http://dotnetslackers.com/Community/blogs/bmains/archive/2009/05/21/linq-to-sql-error-foreignkeyreferencealreadyhasvalueexception.aspx
Etiketler: ForeignKeyReferenceAlreadyHasValueException , insertonsubmit , linq