<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>welt-held.de &#187; ASP.NET MVC</title>
	<atom:link href="http://www.welt-held.de/category/programmierung/asp-net-mvc/feed" rel="self" type="application/rss+xml" />
	<link>http://www.welt-held.de</link>
	<description>Sind wir nicht alle Welt Held?</description>
	<lastBuildDate>Wed, 23 Nov 2011 09:14:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HowTo: Bilder mit CKEditor und ASP.NET MVC hochladen</title>
		<link>http://www.welt-held.de/1588-howto-bilder-mit-ckeditor-und-asp-net-mvc-hochladen.html</link>
		<comments>http://www.welt-held.de/1588-howto-bilder-mit-ckeditor-und-asp-net-mvc-hochladen.html#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:40:29 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[ckeditor]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[wysiwyg]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1588</guid>
		<description><![CDATA[Ich hatte gerade das Problem, dass ich mit dem WYSIWYG-Editor CKEditor Bilder hoch laden möchte, um sie direkt in meinen Text einzupflegen.
Dazu wird irgendwo im View der Editor definiert:
Wichtig ist hier der Parameter &#8220;filebrowserUploadUrl&#8221;. Dies ist der Pfad, wohin das Bild beim Upload gesendet  [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hatte gerade das Problem, dass ich mit dem WYSIWYG-Editor <a href="http://ckeditor.com/">CKEditor</a> Bilder hoch laden möchte, um sie direkt in meinen Text einzupflegen.<br />
Dazu wird irgendwo im View der Editor definiert:</p>
<pre class="brush: jscript; title: ; notranslate">
  &lt;script type=&quot;text/javascript&quot;&gt;
      window.onload = function() {
          CKEDITOR.replace('ckEditor', {
            skin: 'office2003',
            filebrowserUploadUrl: '&lt;%=Url.Action(&quot;UploadImage&quot;) %&gt;'
      });
  };

&lt;/script&gt;</pre>
<p>Wichtig ist hier der Parameter &#8220;filebrowserUploadUrl&#8221;. Dies ist der Pfad, wohin das Bild beim Upload gesendet wird.<br />
Im Controller wird das ganze nun verarbeitet:</p>
<pre class="brush: csharp; title: ; notranslate">
        [AcceptVerbs(HttpVerbs.Post)]
        public string UploadImage()
        {
            // Datei speichern
            var identifier = Guid.NewGuid();
            string[] fileExt = Request.Files[0].FileName.Split('.');
            string safeFile = identifier + &quot;.&quot; + fileExt[fileExt.Length - 1];
            Request.Files[0].SaveAs(Path.Combine(HostingEnvironment.MapPath(&quot;~/UploadedImages/&quot;), safeFile));

            // Daten an CKEditor zurück geben
            string result = &quot;&lt;script type=\&quot;text/javascript\&quot;&gt;&quot;;
            result += &quot;window.parent.CKEDITOR.tools.callFunction(&quot; + Request.QueryString[&quot;CKEditorFuncNum&quot;] + &quot;, \&quot;&quot; +
                      Path.Combine(Url.Content(&quot;~/UploadedImages/&quot;), safeFile) + &quot;\&quot;,\&quot;\&quot;);&lt;/script&gt;&quot;;
            return result;
        }
</pre>
<p>Erst speicher ich das Bild irgendwo und gebe dann den Pfad per Javascript zurück. Da ich nur das JS ausführen lassen muss, gebe ich kein komplettes View zurück. Die Url wird dann korrekt an CKEditor übergeben (siehe Screenshots). Der letzte Parameter des callFunction()-Aufrufes kann für Fehlermeldungen genutzt werden, Bild zu groß o.ä.<br />
Mich hat dieser kleine Aufruf bestimmt eine Stunde gekostet!</p>
<div style="text-align:center">
<a href="http://www.welt-held.de/files/ckeditor1.jpg"><img src="http://www.welt-held.de/files/ckeditor1-150x150.jpg" alt="CKEditor - Datei auswählen, Hochladen" title="CKEditor - Datei auswählen, Hochladen" width="150" height="150" class="alignnone size-thumbnail wp-image-1589" /></a> <a href="http://www.welt-held.de/files/ckeditor2.jpg"><img src="http://www.welt-held.de/files/ckeditor2-150x150.jpg" alt="CKEditor - Datei hochgeladen und Pfad übergeben" title="CKEditor - Datei hochgeladen und Pfad übergeben" width="150" height="150" class="alignnone size-thumbnail wp-image-1590" /></a></div>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1588-howto-bilder-mit-ckeditor-und-asp-net-mvc-hochladen.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1588-howto-bilder-mit-ckeditor-und-asp-net-mvc-hochladen.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1588-howto-bilder-mit-ckeditor-und-asp-net-mvc-hochladen.html"  data-text="HowTo: Bilder mit CKEditor und ASP.NET MVC hochladen" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1588&amp;md5=053010f84484c5783086c075b50b758d" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1588-howto-bilder-mit-ckeditor-und-asp-net-mvc-hochladen.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1588&amp;md5=053010f84484c5783086c075b50b758d" type="text/html" />
	</item>
		<item>
		<title>ASP.NET: Eigenen RoleProvider schreiben</title>
		<link>http://www.welt-held.de/1552-asp-net-eigenen-roleprovider-schreiben.html</link>
		<comments>http://www.welt-held.de/1552-asp-net-eigenen-roleprovider-schreiben.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 23:46:52 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[provider]]></category>
		<category><![CDATA[role]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1552</guid>
		<description><![CDATA[Da ich nun einen eigenen MembershipProvider nutze, möchte ich auch entsprechenden meinen RoleProvider anpassen.
Dies ist eigentlich ähnlich einfach, wie der MembershipProvider. Dazu wird eine eigene Klasse von System.Web.Security.RoleProvider abgeleitet. Auch könnt ihr hier wieder mit dem  [...]]]></description>
			<content:encoded><![CDATA[<p>Da ich nun einen eigenen <a href="http://www.welt-held.de/1473-asp-net-eigenen-membershipprovider-schreiben.html">MembershipProvider</a> nutze, möchte ich auch entsprechenden meinen RoleProvider anpassen.<br />
Dies ist eigentlich ähnlich einfach, wie der MembershipProvider. Dazu wird eine eigene Klasse von System.Web.Security.RoleProvider abgeleitet. Auch könnt ihr hier wieder mit dem Überschreiben der Methode &#8220;Initialize()&#8221; Werte aus der &#8220;web.config&#8221; übergeben. Wo ihr die Daten ablegt, bleibt euch auch hier wieder überlassen.</p>
<p>Das Einbinden in die &#8220;web.config&#8221; erfolgt über folgenden Eintrag:</p>
<pre class="brush: xml; title: ; notranslate">    &lt;roleManager enabled=&quot;true&quot; defaultProvider=&quot;MyPersonalRoleProvider&quot;&gt;
      &lt;providers&gt;
        &lt;clear /&gt;
        &lt;add name=&quot;MyPersonalRoleProvider&quot; type=&quot;MyApp.PersonalRoleProvider&quot; connectionStringName=&quot;MSPConnString&quot; /&gt;
      &lt;/providers&gt;
   &lt;/roleManager&gt;</pre>
<p>Wichtig ist die erste Zeile. Standardmäßig steht &#8220;enabled&#8221; nämlich auf false!<br />
Der RoleProvider ist nun fertig zum Einsatz! In eurem ASP.NET Projekt könnt ihr auf die Daten über die Standardmethoden wie etwa &#8220;Role.IsUserInRole()&#8221; etc. zugreifen. Mehr dazu steht in der <a href="http://msdn.microsoft.com/de-de/library/system.web.security.roleprovider_members(VS.80).aspx">MSDN</a>.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1552-asp-net-eigenen-roleprovider-schreiben.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1552-asp-net-eigenen-roleprovider-schreiben.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1552-asp-net-eigenen-roleprovider-schreiben.html"  data-text="ASP.NET: Eigenen RoleProvider schreiben" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1552&amp;md5=477c632d6d3b928ad70956f19ed7a4b6" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1552-asp-net-eigenen-roleprovider-schreiben.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1552&amp;md5=477c632d6d3b928ad70956f19ed7a4b6" type="text/html" />
	</item>
		<item>
		<title>ASP.NET: Eigenen MembershipProvider schreiben</title>
		<link>http://www.welt-held.de/1473-asp-net-eigenen-membershipprovider-schreiben.html</link>
		<comments>http://www.welt-held.de/1473-asp-net-eigenen-membershipprovider-schreiben.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 23:27:38 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[membership]]></category>
		<category><![CDATA[provider]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1473</guid>
		<description><![CDATA[Manchmal kann es Sinn machen, nicht den standardmäßigen ASP.NET MembershipProvider zu nutzen. Daher möchte ich euch kurz erklären, wie ihr einen eigenen MembershipProvider schreiben könnt. Dabei ist es letztendlich euch überlassen, wo die Daten gespeichert sind. 
Ich benutze bei einem Projekt etwa  [...]]]></description>
			<content:encoded><![CDATA[<p>Manchmal kann es Sinn machen, nicht den standardmäßigen ASP.NET MembershipProvider zu nutzen. Daher möchte ich euch kurz erklären, wie ihr einen eigenen MembershipProvider schreiben könnt. Dabei ist es letztendlich euch überlassen, wo die Daten gespeichert sind. </p>
<p>Ich benutze bei einem Projekt etwa eine SQL-Datenbank und speicher bzw. lese die Daten per Stored-Procedures. Man könnte die Daten aber auch in einer XML-Datei speichern oder direkt hardcoded in der Klasse.<br />
<span id="more-1473"></span><br />
Als erstes erstellen wir ein neues Projekt in Visual Studio. Alternativ könnt ihr auch eine neue Klasse in einem bestehenden Projekt anlegen. Ich habe es als neues Projekt unterhalb meiner Projektmappe angelegt, der Übersicht halber. </p>
<p>Nun erstellen wir eine Klasse und leiten sie vom MembershipProvider ab:</p>
<pre class="brush: csharp; title: ; notranslate">using System;
using System.Configuration;
using System.Configuration.Provider;
using System.Data;
using System.Security.Cryptography;
using System.Text;
using System.Web.Security;
using System.Data.SqlClient;

namespace MyApp
{
    public class PersonalMembershipProvider : MembershipProvider
    {
        public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
        {
            throw new NotImplementedException();
        }

        public override bool ChangePassword(string username, string oldPassword, string newPassword)
        {
            throw new NotImplementedException();
        }

        public override bool ValidateUser(string username, string password)
        {
            throw new NotImplementedException();
        }

        public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
        {
            throw new NotImplementedException();
        }

        public override MembershipUser GetUser(string username, bool userIsOnline)
        {
            throw new NotImplementedException();
        }

        public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
        {
            throw new NotImplementedException();
        }

        public override string ApplicationName
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }

        public override MembershipPasswordFormat PasswordFormat
        {
            get { throw new NotImplementedException(); }
        }
    }
}
</pre>
<p>Oben sind nicht alle Methoden / Attribute aufgelistet, der Übersicht halber. Eine Methode wird standardmäßig nicht überschrieben, ist meiner Meinung aber sehr wichtig. Per &#8220;Initialize()&#8221; können Werte aus der &#8220;web.config&#8221; des Zielprojektes an den RoleProvider übergeben werden. Diese können etwa den SQL-ConnectionString etc. enthalten. Hierbei gibt es eigentlich keine Vorgaben.</p>
<pre class="brush: csharp; title: ; notranslate">
        public override void Initialize(string name, NameValueCollection config)
        {
            if (config == null)
            {
                throw new ArgumentNullException(&quot;config&quot;);
            }
            if (string.IsNullOrEmpty(name))
            {
                name = &quot;MyPersonalMembershipProvider&quot;;
            }
            base.Initialize(name, config);

            // ConnectionString auslesen
            ConnectionStringSettings connectionStringSettings = ConfigurationManager.ConnectionStrings[config[&quot;connectionStringName&quot;]];

            if ((connectionStringSettings == null) || (connectionStringSettings.ConnectionString.Trim() == String.Empty))
            {
                throw new ProviderException(&quot;Connection string cannot be blank.&quot;);
            }
            this._connectionString = connectionStringSettings.ConnectionString;
        }
</pre>
<p>In diesem Beispiel wird etwa mit der Zeile &#8220;ConnectionStringSettings connectionStringSettings = ConfigurationManager.ConnectionStrings[config["connectionStringName"]];&#8221; der Connectionstring aus der &#8220;web.config&#8221; ausgelesen. Dazu wird der ConnectionStringName mit übergeben, wodurch über den ConfigurationManager der String ausgelesen werden kann. Weiterhin könnte man etwa übergeben, in welchem Format die Passwörter in der Datenbank gespeichert werden.</p>
<p>Nachdem ihr die Methoden entsprechend euren Bedürfnissen ausprogrammiert habt, wird es Zeit den MembershipProvider in eurem ASP.NET-Projekt einzubinden.<br />
Dies geht relativ einfach. Für eine SQL-Verbindung benötigen wir einen entsprechenden ConnectionString. Sollte dieser noch nicht existieren oder die Benutzerdaten in einer anderen Datenbank liegen, legt einen entsprechenden Eintrag in der &#8220;web.config&#8221; an. Desweiteren müsst ihr unter &lt;membership&gt; einen Eintrag anlegen, der auf den eigenen MembershipProvider verweißt. Solltet ihr mehre MembershipProvider nutzen, so solltet ihr angeben, welches der Standardprovider ist (defaultProvider).</p>
<pre class="brush: xml; highlight: [3,7,10]; title: ; notranslate">
&lt;configuration&gt;
  &lt;connectionStrings&gt;
    &lt;add name=&quot;MSPConnString&quot; connectionString=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|userdata.mdf;Integrated Security=True;User Instance=True&quot; providerName=&quot;System.Data.SqlClient&quot; /&gt;
  &lt;/connectionStrings&gt;

  &lt;system.web&gt;
    &lt;membership defaultProvider=&quot;MyPersonalMembershipProvider&quot;&gt;
      &lt;providers&gt;
        &lt;clear /&gt;
        &lt;add name=&quot;MyPersonalMembershipProvider&quot; type=&quot;MyApp.PersonalMembershipProvider&quot; connectionStringName=&quot;MSPConnString&quot; passwordFormat=&quot;Hashed&quot; /&gt;
      &lt;/providers&gt;
    &lt;/membership&gt;
  &lt;/system.web&gt;
&lt;/configuration&gt;
</pre>
<p>Ich habe in dem Beispiel noch einen Wert mit übergeben. Der sagt aus, dass ich meine Passwörter in der Datenbank <a href="http://www.welt-held.de/1455-c-hashes-versalzen.html">gehasht</a> ablegen möchte.<br />
Dies muss ich natürlich ausprogrammieren.<br />
Der MembershipProvider ist nun einsatzbereit.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1473-asp-net-eigenen-membershipprovider-schreiben.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1473-asp-net-eigenen-membershipprovider-schreiben.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1473-asp-net-eigenen-membershipprovider-schreiben.html"  data-text="ASP.NET: Eigenen MembershipProvider schreiben" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1473&amp;md5=c4ed668da502e07e43b617b61b56970d" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1473-asp-net-eigenen-membershipprovider-schreiben.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1473&amp;md5=c4ed668da502e07e43b617b61b56970d" type="text/html" />
	</item>
		<item>
		<title>Linq to Entity &#8211; Many to Many Relationship Problem</title>
		<link>http://www.welt-held.de/1540-linq-to-entity-many-to-many-relationship-problem.html</link>
		<comments>http://www.welt-held.de/1540-linq-to-entity-many-to-many-relationship-problem.html#comments</comments>
		<pubDate>Sat, 26 Dec 2009 19:49:36 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ado.net]]></category>
		<category><![CDATA[linq]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1540</guid>
		<description><![CDATA[Aktuell habe ich folgendes Problem.
Ich habe eine Tabelle Rollen und eine Tabelle Benutzer, beide stehen über eine dritte Tabelle in einer m:m-Beziehung. Per Linq-to-Entity, also über ein ADO.NET Modell hole ich mir die Daten. Jedoch kann ich keine Relationen speichern.
Aktuell bekomme ich die  [...]]]></description>
			<content:encoded><![CDATA[<p>Aktuell habe ich folgendes Problem.<br />
Ich habe eine Tabelle Rollen und eine Tabelle Benutzer, beide stehen über eine dritte Tabelle in einer m:m-Beziehung. Per Linq-to-Entity, also über ein ADO.NET Modell hole ich mir die Daten. Jedoch kann ich keine Relationen speichern.<br />
Aktuell bekomme ich die Fehlermeldung: </p>
<pre class="brush: plain; title: ; notranslate">EntitySet 'UserInRole' kann nicht aktualisiert werden, denn es hat eine DefiningQuery, und im &lt;ModificationFunctionMapping&gt;-Element ist kein &lt;InsertFunction&gt;-Element zur Unterstützung des aktuellen Vorgangs vorhanden.</pre>
<p>Eine Suche im Netz bring mich nicht wirklich weiter. Dort hieß es, ich soll für die m:m-Tabelle einen Primary-Key setzen. Habe ich über beide Felder getan, Ergebnis war das selbe.<br />
Bei dem Beispiel kann ich es über den Role-Provider lösen, aber so richtig weiter bringt es mich dann an anderer Stelle nicht.<br />
Ich werde weiter berichten.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1540-linq-to-entity-many-to-many-relationship-problem.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1540-linq-to-entity-many-to-many-relationship-problem.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1540-linq-to-entity-many-to-many-relationship-problem.html"  data-text="Linq to Entity &#8211; Many to Many Relationship Problem" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1540&amp;md5=68111a4af3cbecfeef1be3590c8dc4cb" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1540-linq-to-entity-many-to-many-relationship-problem.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1540&amp;md5=68111a4af3cbecfeef1be3590c8dc4cb" type="text/html" />
	</item>
		<item>
		<title>ADO.NET: Feld ausschließen</title>
		<link>http://www.welt-held.de/1498-ado-net-feld-ausschliesen.html</link>
		<comments>http://www.welt-held.de/1498-ado-net-feld-ausschliesen.html#comments</comments>
		<pubDate>Fri, 18 Dec 2009 22:06:56 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ado.net]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1498</guid>
		<description><![CDATA[Als ich den letzten Beitrag schrieb, viel mir ja ein, dass man nicht immer alle Spalten an das Modell übergeben möchte. Oder das es nur Readonly oder ähnliches ist.
Im Prinzip ist es auch einfach, wenn man weiß wie es geht. Der Designer in Visual Studio ist da meiner Meinung etwas umständlich in  [...]]]></description>
			<content:encoded><![CDATA[<p>Als ich den letzten <a href="http://www.welt-held.de/1491-ado-net-datenbankstruktur-aktualisieren.html">Beitrag</a> schrieb, viel mir ja ein, dass man nicht immer alle Spalten an das Modell übergeben möchte. Oder das es nur Readonly oder ähnliches ist.<br />
Im Prinzip ist es auch einfach, wenn man weiß wie es geht. Der Designer in Visual Studio ist da meiner Meinung etwas umständlich in der Handhabung.<br />
So möchte ich bei meinem letzten Modell die ID auf Readonly setzen, da dies in der Datenbank automatisch hochgezählt wird. Die ID daher manuell zu setzen würde keinen Sinn ergeben.<br />
<a href="http://www.welt-held.de/wp-upload/adonet5.jpg"><img src="http://www.welt-held.de/wp-upload/adonet5.jpg" alt="ADO.NET Modell" title="ADO.NET Modell" width="224" height="217" class="alignnone size-full wp-image-1496" /></a></p>
<p>Dazu öffne ich das Modell im Visual Studio Designer und wähle oben die Tabelle aus. Unten wird mir nun das Fenster &#8220;Zuordnungsdetails&#8221; angezeigt (alternativ über Ansicht &raquo; Weitere Fenster). Hier wähle ich die Spalte durch anklicken aus, die ich bearbeiten möchte. Wichtig ist jetzt dass ich hier nicht das vordere MSSQL-Feld sondern den hinteren Bereich, also den C# Typen auswähle (siehe Markierung).<br />
<a href="http://www.welt-held.de/wp-upload/adonet6.jpg"><img src="http://www.welt-held.de/wp-upload/adonet6-1024x241.jpg" alt="ADO.NET Feld bearbeiten" title="ADO.NET Feld bearbeiten" width="600" height="141" class="alignnone size-large wp-image-1499" /></a></p>
<p>Im Eigenschaftsfenster könnt ihr nun die entsprechenden Werte ändern. In dem Fall setzen wir den Setter auf Private.<br />
<a href="http://www.welt-held.de/wp-upload/adonet7.jpg"><img src="http://www.welt-held.de/wp-upload/adonet7.jpg" alt="Eigenschaften" title="Eigenschaften" width="275" height="334" class="alignnone size-full wp-image-1501" /></a></p>
<p>Wenn wir nun versuchen eine Id zu setzen, hagelt es Fehlermeldungen:</p>
<pre class="brush: csharp; title: ; toolbar: false; notranslate">TestTable test = new TestTable();
test.Id = 3;</pre>
<p>Fehlermeldung lautet:</p>
<pre class="brush: plain; title: ; toolbar: false; notranslate">
Die Eigenschaft oder der Indexer &quot;MvcApplication1.Models.TestTable.Id&quot; kann in diesem Kontext nicht verwendet werden, da der set-Accessor nicht verfügbar ist.</pre>
<p>Auf diesen Weg können wir auch noch andere Sachen ändern, z.B. den Getter verändern oder den Namen des Attributs ändern.</p>
<p>Ach sollte man ein Feld gar nicht im Modell haben wollen, so wählt man bei den Zuordnungdetails einfach &#8220;Löschen&#8221; aus.<br />
<a href="http://www.welt-held.de/wp-upload/adonet8.jpg"><img src="http://www.welt-held.de/wp-upload/adonet8-300x39.jpg" alt="ADO.NET Feld löschen" title="ADO.NET Feld löschen" width="300" height="39" class="alignnone size-medium wp-image-1502" /></a></p>
<p>Auf den Weg könnt ihr das Feld später auch wieder ins Modell reinholen.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1498-ado-net-feld-ausschliesen.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1498-ado-net-feld-ausschliesen.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1498-ado-net-feld-ausschliesen.html"  data-text="ADO.NET: Feld ausschließen" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1498&amp;md5=2a5757604ff1d8c9f67c93ca0df1a995" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1498-ado-net-feld-ausschliesen.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1498&amp;md5=2a5757604ff1d8c9f67c93ca0df1a995" type="text/html" />
	</item>
		<item>
		<title>ADO.NET: Datenbankstruktur aktualisieren</title>
		<link>http://www.welt-held.de/1491-ado-net-datenbankstruktur-aktualisieren.html</link>
		<comments>http://www.welt-held.de/1491-ado-net-datenbankstruktur-aktualisieren.html#comments</comments>
		<pubDate>Fri, 18 Dec 2009 21:42:53 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ado.net]]></category>
		<category><![CDATA[aktualisieren]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1491</guid>
		<description><![CDATA[Angenommen ihr habt eine Tabelle, auf die ihr mit dem ADO.NET Provider zugreift. Ihr habt ihn schön konfiguriert und nutzt ihn auch schon produktiv. Dieses Model könnte in etwa so aussehen:

Auch wenn man sich vorher Gedanken gemacht hat, kann es sein, dass sich die Struktur der Datenbank ändert.  [...]]]></description>
			<content:encoded><![CDATA[<p>Angenommen ihr habt eine Tabelle, auf die ihr mit dem ADO.NET Provider zugreift. Ihr habt ihn schön konfiguriert und nutzt ihn auch schon produktiv. Dieses Model könnte in etwa so aussehen:</p>
<p><a href="http://www.welt-held.de/wp-upload/adonet.jpg"><img src="http://www.welt-held.de/wp-upload/adonet.jpg" alt="ADO.NET Model" title="ADO.NET Model" width="218" height="193" class="alignnone size-full wp-image-1492" /></a></p>
<p>Auch wenn man sich vorher Gedanken gemacht hat, kann es sein, dass sich die Struktur der Datenbank ändert. Ein neues Feld muss hinzugefügt werden als Beispiel. Wie in meinem Beispiel.<br />
<a href="http://www.welt-held.de/wp-upload/adonet2.jpg"><img src="http://www.welt-held.de/wp-upload/adonet2.jpg" alt="Datenbankänderung" title="Datenbankänderung" width="417" height="182" class="alignnone size-full wp-image-1493" /></a></p>
<p>Nun möchte ich diese Änderungen natürlich auch möglichst einfach in mein Model bekommen, ohne dies neu anzulegen. Öffnet das Model in Visual Studio per Doppelklick, so dass ihr in den Designer kommt. Rechtsklickt dort irgendwo und wählt &#8220;Modell aus Datenbank aktualisieren&#8221;.<br />
<a href="http://www.welt-held.de/wp-upload/adonet3.jpg"><img src="http://www.welt-held.de/wp-upload/adonet3.jpg" alt="ADO.NET Modell aktualisieren" title="ADO.NET Modell aktualisieren" width="421" height="327" class="alignnone size-full wp-image-1494" /></a></p>
<p>Wählt im folgenden Bildschirm den Reiter &#8220;Aktualisieren&#8221;. Hierbei sei erwähnt, dass nun alles aus der Datenbank aktualisiert wird! Also solltet ihr euch die Änderungen dann noch mal ansehen.<br />
<a href="http://www.welt-held.de/wp-upload/adonet4.jpg"><img src="http://www.welt-held.de/wp-upload/adonet4-150x150.jpg" alt="ADO.NET Aktualisieren" title="ADO.NET Aktualisieren" width="150" height="150" class="alignnone size-thumbnail wp-image-1495" /></a></p>
<p>Zu guter letzt habt ihr nun das neue Feld in eurem Ado.Net Modell.<br />
<a href="http://www.welt-held.de/wp-upload/adonet5.jpg"><img src="http://www.welt-held.de/wp-upload/adonet5.jpg" alt="adonet5" title="adonet5" width="224" height="217" class="alignnone size-full wp-image-1496" /></a></p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1491-ado-net-datenbankstruktur-aktualisieren.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1491-ado-net-datenbankstruktur-aktualisieren.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1491-ado-net-datenbankstruktur-aktualisieren.html"  data-text="ADO.NET: Datenbankstruktur aktualisieren" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1491&amp;md5=442a3e71d07b827e98198803c074fa8d" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1491-ado-net-datenbankstruktur-aktualisieren.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1491&amp;md5=442a3e71d07b827e98198803c074fa8d" type="text/html" />
	</item>
		<item>
		<title>Buch: jQuery &#8211; Kurz und gut</title>
		<link>http://www.welt-held.de/1469-buch-jquery-kurz-und-gut.html</link>
		<comments>http://www.welt-held.de/1469-buch-jquery-kurz-und-gut.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 07:17:33 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[buch]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[nützlich]]></category>
		<category><![CDATA[o'reilly]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1469</guid>
		<description><![CDATA[Ich beschäftige mich immer mehr mit ASP.NET MVC und komme so nicht vor JavaScript Frameworks wie jQuery herum. Ich finde das Framework sehr mächtig und es erleichtert einem die Arbeit ungemein. Daher habe ich mir ein kleines Taschenbuch dazu gekauft:

Ich habe bis jetzt zwar nur mal kurz  [...]]]></description>
			<content:encoded><![CDATA[<p>Ich beschäftige mich immer mehr mit ASP.NET MVC und komme so nicht vor JavaScript Frameworks wie <a href="http://jquery.com/">jQuery</a> herum. Ich finde das Framework sehr mächtig und es erleichtert einem die Arbeit ungemein. Daher habe ich mir ein kleines Taschenbuch dazu gekauft:</p>
<p><a href="http://www.welt-held.de/buch/jQuery-kurz-und-gut-o-reillys-taschenbibliothek"><img src="http://www.welt-held.de/wp-upload/jquerybuch.jpg" alt="jQuery - kurz und gut" title="jQuery - kurz und gut" width="98" height="160" class="alignnone size-full wp-image-1470" /></a></p>
<p>Ich habe bis jetzt zwar nur mal kurz durchgeblättert, aber es scheint recht interessant zu sein und einen kleinen Einblick ins innere zu geben.<br />
Nun brauch ich nur noch ein ordentliches Buch über LINQ</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1469-buch-jquery-kurz-und-gut.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1469-buch-jquery-kurz-und-gut.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1469-buch-jquery-kurz-und-gut.html"  data-text="Buch: jQuery &#8211; Kurz und gut" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1469&amp;md5=3c520a5d452591075cc4c4c1935f2baf" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1469-buch-jquery-kurz-und-gut.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1469&amp;md5=3c520a5d452591075cc4c4c1935f2baf" type="text/html" />
	</item>
		<item>
		<title>C#: Hashes versalzen</title>
		<link>http://www.welt-held.de/1455-c-hashes-versalzen.html</link>
		<comments>http://www.welt-held.de/1455-c-hashes-versalzen.html#comments</comments>
		<pubDate>Wed, 02 Dec 2009 21:51:02 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[hashes]]></category>
		<category><![CDATA[hashing]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[salt]]></category>
		<category><![CDATA[sha]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1455</guid>
		<description><![CDATA[Kleine Vorgeschichte
Heute habe ich mir die Möglichkeit angeschaut, eigene MembershipProvider für ein ASP.NET MVC Projekt zu schreiben. Selbstverständlich wollte ich die Passwörter in der Datenbank nur als Hash speichern. Gleich ist mir wieder ein altes Problem aufgefallen, welches mir auch damals  [...]]]></description>
			<content:encoded><![CDATA[<p><b>Kleine Vorgeschichte</b><br />
Heute habe ich mir die Möglichkeit angeschaut, eigene MembershipProvider für ein ASP.NET MVC Projekt zu schreiben. Selbstverständlich wollte ich die Passwörter in der Datenbank nur als <a href="http://de.wikipedia.org/wiki/Hashfunktion">Hash</a> speichern. Gleich ist mir wieder ein altes Problem aufgefallen, welches mir auch damals bei PHP aufgefallen ist. Vorteil der Hashmethode ist die fehlende Möglichkeit, wieder in Klartext umgewandelt zu werden. Allerdings ist der Hash immer gleich.<br />
So wird aus </p>
<p>md5(&#8220;test&#8221;) immer &#8220;098f6bcd4621d373cade4e832627b4f6&#8243;</p>
<p><b>Das Problem</b><br />
Selbst wenn nun ein böser Hacker die Datenbank ausliest, kommt er so an das Passwort. Der einfachste Weg liegt dabei so nahe, dass man gar nicht drauf kommt. Gebt mal so einen Hash bei <a href="http://www.google.de/search?q=098f6bcd4621d373cade4e832627b4f6">Google</a> ein, man wird das Passwort herausfinden können. Und mittlerweile gibt es ganze <a href="http://de.wikipedia.org/wiki/Rainbow_Table">Rainbow-Tabellen</a>, so dass es immer einfacher wird, die Werte zu vergleichen.<br />
Aufgrund des Einfallsreichtums mancher Menschen tippe ich mal darauf, dass man ca. 50% der Passwörter der Otto-Normal-Benutzer daher innerhalb weniger Minuten knacken könnte.<br />
<span id="more-1455"></span><br />
<b>Eine mögliche Lösung</b><br />
Eine sehr elegante Möglichkeit ist es daher, den Hash zu versalzen (engl. <a href="http://de.wikipedia.org/wiki/Salt_(Kryptologie)">Salt</a>).<br />
Die Idee dahinter ist so simpel wie erfolgreich. Ein per Zufall (im Idealfall) erzeugter String, wird vor oder hinter das Passwort gehangen, dieser String dann gehashet. An diesen Hash wird wieder der per Zufall erzeugte String angehangen (oder davor). Das Ergebnis wäre dann:</p>
<p><span style="color: green">SALT</span><span style="color:red">HASHEDPASSWORD</span></p>
<p>Den Salt brauchen wir an der Stelle wieder, um das Passwort wieder zu vergleichen. Anhand des Klartextpasswortes und des Salt können wir wieder den Hash erstellen und so die Werte vergleichen und der Benutzer kann sich einloggen oder wird halt ausgesperrt.</p>
<p><b>Vorteil des Versalzens</b><br />
Nun wo liegt der Vorteil gegenüber der salzlosen Methode? Da der Salt per Zufall erzeugt wird, kommen am Ende bei selben Eingabewerten trotzdem unterschiedliche Hashes raus. Zwar kann man diese durch den ja bekannten Salt per <a href="http://de.wikipedia.org/wiki/Brute-Force-Methode">BruteForce</a> das Passwort knacken, was jedoch sehr Zeitaufwendig ist. Aber der einfache Vergleich mit Rainbow-Tables ist nicht mehr möglich, da die Wahrscheinlichkeit sehr gering ist, dass es Rainbow-Tables mit genau dem Passwort und dem Salt gibt.</p>
<p><b>Meine Salzstreuerklasse</b><br />
Aber zurück zum Thema, ich wollte gerne genau so eine Salt Methode nutzen.<br />
Jedoch fand ich auf Anhieb nichts fertiges in C#. Also habe ich ein wenig gegooglet und mir was eigenes programmiert, welches ich euch nicht vorenthalten möchte. </p>
<p>Die Verwendung ist simpel. Die Klasse sowie eine Demokonsolenanwendung findet ihr im Anhang.<br />
Hier eine kurze Doku zur Erklärung.</p>
<pre class="brush: csharp; title: ; notranslate">        /// &lt;summary&gt;
        /// Gibt die Länge des Salt zurück, sofern eine vom Benutzer gesetzt wurde.
        /// Andernfalls wird eine Zufallslänge zurückgegeben.
        /// &lt;/summary&gt;
        public int SaltLength

        /// &lt;summary&gt;
        /// Gibt einen Base64-Encoded String zurück, welcher nach dem DefaultHashAlgorithm gehashed wurde.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;password&quot;&gt;Passwort&lt;/param&gt;
        /// &lt;param name=&quot;hashMethod&quot;&gt;Die verwendete Hashmethode. Möglich: SHA1, SHA256, SHA384, SHA512, RIPEMD160, MD5&lt;/param&gt;
        /// &lt;param name=&quot;salt&quot;&gt;Zu verendenen Salt.&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public string Hash(string password, string hashMethod, byte[] salt)

        /// &lt;summary&gt;
        /// Gibt einen Base64-Encoded String zurück, welcher nach dem DefaultHashAlgorithm gehashed wurde.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;password&quot;&gt;Passwort&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public string Hash(string password)

        /// &lt;summary&gt;
        /// Gibt einen Base64-Encoded String zurück, welcher nach dem DefaultHashAlgorithm gehashed wurde.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;password&quot;&gt;Passwort&lt;/param&gt;
        /// &lt;param name=&quot;hashMethod&quot;&gt;Die verwendete Hashmethode. Möglich: SHA1, SHA256, SHA384, SHA512, RIPEMD160, MD5&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public string Hash(string password, string hashMethod)

        /// &lt;summary&gt;
        /// Gibt einen Base64-Encoded String zurück, welcher nach dem DefaultHashAlgorithm gehashed wurde.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;password&quot;&gt;Passwort&lt;/param&gt;
        /// &lt;param name=&quot;salt&quot;&gt;Zu verendenen Salt.&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public string Hash(string password, byte[] salt)

        /// &lt;summary&gt;
        /// Vergleicht ein Passwort mit einem Hash
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;password&quot;&gt;&lt;/param&gt;
        /// &lt;param name=&quot;hash&quot;&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public bool VerifyHash(string password, string hash)

        /// &lt;summary&gt;
        /// Vergleicht ein Passwort mit einem Hash nach der angebenen Hashmethode.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;password&quot;&gt;&lt;/param&gt;
        /// &lt;param name=&quot;hash&quot;&gt;&lt;/param&gt;
        /// &lt;param name=&quot;hashMethod&quot;&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public bool VerifyHash(string password, string hash, string hashMethod)
</pre>
<p>Viel Spaß damit!</p>
<p><strong>Download</strong><br />
<a href='http://www.welt-held.de/download/C-Sharp-SaltHash.zip'><img src="http://www.welt-held.de/wp-includes/images/crystal/archive.png" alt="SaltHash.zip"/>SaltHash.zip</a></p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1455-c-hashes-versalzen.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1455-c-hashes-versalzen.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1455-c-hashes-versalzen.html"  data-text="C#: Hashes versalzen" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1455&amp;md5=750e1ce1921cbfbb509d9bf8b4b26813" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1455-c-hashes-versalzen.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1455&amp;md5=750e1ce1921cbfbb509d9bf8b4b26813" type="text/html" />
	</item>
		<item>
		<title>ASP.NET MVC: Seiten gehen nicht auf IIS5.1</title>
		<link>http://www.welt-held.de/1451-asp-net-mvc-seiten-gehen-nicht-auf-iis5-1.html</link>
		<comments>http://www.welt-held.de/1451-asp-net-mvc-seiten-gehen-nicht-auf-iis5-1.html#comments</comments>
		<pubDate>Tue, 01 Dec 2009 13:57:21 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[connectionstrings]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[problem]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1451</guid>
		<description><![CDATA[Wir hatten folgendes Problem, wir entwickeln an einer ASP.NET Seite. Mit dem lokalen Entwicklungswebserver funktionierten die Seiten tadellos.
Als wir sie dann hochluden, gingen einige Seiten nicht und wir wussten nicht genau warum.
Nach einiger Sucherei konnten wir dies auf die &#60;connectionStrings&#62;  [...]]]></description>
			<content:encoded><![CDATA[<p>Wir hatten folgendes Problem, wir entwickeln an einer ASP.NET Seite. Mit dem lokalen Entwicklungswebserver funktionierten die Seiten tadellos.<br />
Als wir sie dann hochluden, gingen einige Seiten nicht und wir wussten nicht genau warum.</p>
<p>Nach einiger Sucherei konnten wir dies auf die &lt;connectionStrings&gt; in der web.config zurückführen.<br />
Durch einen Kollegen stand dort folgende zwei Einträge drin:</p>
<pre class="brush: xml; title: ; toolbar: false; notranslate">
    &lt;add name=&quot;PersonalSettingsEntities&quot;
    connectionString=&quot;metadata=res://*/Models.Personal.csdl|res://*/Models.Personal.ssdl|res://*/Models.Personal.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;Data Source=WXPAPP02\SQLEXPRESS;Initial Catalog=IntranetDB;User ID=sa;Password=sa;Pooling=False;MultipleActiveResultSets=True&amp;quot;&quot;
    providerName=&quot;System.Data.EntityClient&quot; /&gt;
    &lt;add name=&quot;PersonalEntities&quot;
    connectionString=&quot;metadata=res://*/Models.Home.csdl|res://*/Models.Home.ssdl|res://*/Models.Home.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;Data Source=WXPAPP02\SQLEXPRESS;Initial Catalog=IntranetDB;User ID=sa;Password=sa;Pooling=False;MultipleActiveResultSets=True&amp;quot;&quot;
    providerName=&quot;System.Data.EntityClient&quot; /&gt;
</pre>
<p>Der Unterschied zu den anderen Connectionstrings war, dass diese Einträge die Einträge &#8220;<b>Pooling=False;</b>&#8221; enthält, und den Eintrag &#8220;<b>Persist Security Info=True;</b>&#8221; war <b>nicht</b> enthalten.<br />
Die Zeilen entsprechend abgeändert, schon ging es.<br />
Werde nachher noch mal genaue Erklärung zu den beiden Parametern raussuchen.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1451-asp-net-mvc-seiten-gehen-nicht-auf-iis5-1.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1451-asp-net-mvc-seiten-gehen-nicht-auf-iis5-1.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1451-asp-net-mvc-seiten-gehen-nicht-auf-iis5-1.html"  data-text="ASP.NET MVC: Seiten gehen nicht auf IIS5.1" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1451&amp;md5=4f487127e8c4df530cb626a70e50eebb" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1451-asp-net-mvc-seiten-gehen-nicht-auf-iis5-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1451&amp;md5=4f487127e8c4df530cb626a70e50eebb" type="text/html" />
	</item>
		<item>
		<title>ASP.NET MVC: nl2br() Ersatz für HtmlHelper</title>
		<link>http://www.welt-held.de/1439-asp-net-mvc-nl2br-ersatz-fur-htmlhelper.html</link>
		<comments>http://www.welt-held.de/1439-asp-net-mvc-nl2br-ersatz-fur-htmlhelper.html#comments</comments>
		<pubDate>Wed, 25 Nov 2009 09:55:43 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[extension method]]></category>
		<category><![CDATA[htmlhelper]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1439</guid>
		<description><![CDATA[Da ich ja ursprünglich von PHP herkomme, habe ich natürlich eine schöne Funktion wie nl2br() vermisst.
Da ich nichts gescheites gefunden habe, habe ich natürlich die Funktionen von C#3.0 ausgenutzt und einfach die HtmlHelper Class erweitert.
Vielleicht kann es ja wer  [...]]]></description>
			<content:encoded><![CDATA[<p>Da ich ja ursprünglich von PHP herkomme, habe ich natürlich eine schöne Funktion wie <a href="http://www.php.net/nl2br">nl2br()</a> vermisst.<br />
Da ich nichts gescheites gefunden habe, habe ich natürlich die Funktionen von C#3.0 ausgenutzt und einfach die<a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper.aspx"> HtmlHelper Class</a> erweitert.<br />
Vielleicht kann es ja wer gebrauchen.</p>
<pre class="brush: csharp; title: ; notranslate">using System.Web.Mvc;

namespace MyProject.CustomExtensions
{
    public static class MyHtmlHelperExtensions
    {
        public static string Encode(this HtmlHelper html, string text, bool convertNewLine)
        {
            if (convertNewLine)
            {
                return html.Encode(text).Replace(&quot;\n&quot;, &quot;&lt;br /&gt;&quot;);
            }
            return html.Encode(text);
        }

        public static string Encode(this HtmlHelper html, object text, bool convertNewLine)
        {
            if (convertNewLine)
            {
                return html.Encode(text).Replace(&quot;\n&quot;, &quot;&lt;br /&gt;&quot;);
            }
            return html.Encode(text);
        }
    }

}</pre>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1439-asp-net-mvc-nl2br-ersatz-fur-htmlhelper.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1439-asp-net-mvc-nl2br-ersatz-fur-htmlhelper.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1439-asp-net-mvc-nl2br-ersatz-fur-htmlhelper.html"  data-text="ASP.NET MVC: nl2br() Ersatz für HtmlHelper" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1439&amp;md5=f7a670f4d851804a1df30c0d139fa72d" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1439-asp-net-mvc-nl2br-ersatz-fur-htmlhelper.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1439&amp;md5=f7a670f4d851804a1df30c0d139fa72d" type="text/html" />
	</item>
		<item>
		<title>C# &#8211; Wissenwertes zu IEnumerable und wie man es richtig nutzt</title>
		<link>http://www.welt-held.de/1432-c-wissenwertes-zu-ienumerable-und-wie-man-es-richtig-nutzt.html</link>
		<comments>http://www.welt-held.de/1432-c-wissenwertes-zu-ienumerable-und-wie-man-es-richtig-nutzt.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 18:23:17 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[lesenswert]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[programmieren]]></category>
		<category><![CDATA[tipp]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1432</guid>
		<description><![CDATA[Peter Bucher hat einen interessanten Artikel rund um IEnumerable und wie und wann man es richtig nutzt veröffentlicht.
Sollte man mal gelesen haben und natürlich auch anwenden. Ich werd es auf jeden Fall!
Wann IEnumerable nutzen, wann ICollection und wieso überhaupt IList?
Gibt in dem Blog übrigens  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.aspnetzone.de/blogs/peterbucher/default.aspx">Peter Bucher</a> hat einen interessanten <a href="http://www.aspnetzone.de/blogs/peterbucher/archive/2009/11/19/wann-ienumerable-nutzen-wann-icollection-und-wieso-berhaupt-ilist.aspx">Artikel</a> rund um IEnumerable und wie und wann man es richtig nutzt veröffentlicht.<br />
Sollte man mal gelesen haben und natürlich auch anwenden. Ich werd es auf jeden Fall!</p>
<p><a href="http://www.aspnetzone.de/blogs/peterbucher/archive/2009/11/19/wann-ienumerable-nutzen-wann-icollection-und-wieso-berhaupt-ilist.aspx">Wann IEnumerable nutzen, wann ICollection und wieso überhaupt IList?</a></p>
<p>Gibt in dem Blog übrigens noch andere lesenswerte Beiträge!</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1432-c-wissenwertes-zu-ienumerable-und-wie-man-es-richtig-nutzt.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1432-c-wissenwertes-zu-ienumerable-und-wie-man-es-richtig-nutzt.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1432-c-wissenwertes-zu-ienumerable-und-wie-man-es-richtig-nutzt.html"  data-text="C# &#8211; Wissenwertes zu IEnumerable und wie man es richtig nutzt" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1432&amp;md5=e96d5f2f0c0cada9811259c9e7765f5e" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1432-c-wissenwertes-zu-ienumerable-und-wie-man-es-richtig-nutzt.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1432&amp;md5=e96d5f2f0c0cada9811259c9e7765f5e" type="text/html" />
	</item>
		<item>
		<title>Html.Textbox und Ajax.BeginForm</title>
		<link>http://www.welt-held.de/1429-html-textbox-und-ajax-beginform.html</link>
		<comments>http://www.welt-held.de/1429-html-textbox-und-ajax-beginform.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 11:15:37 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[htmlhelper]]></category>
		<category><![CDATA[lösung]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[problem]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1429</guid>
		<description><![CDATA[So langsam sammel ich meine Erfahrung mit ASP.NET MVC, gute sowie schlechte.
Da kommen wir mal zu meinem heutigen Problem. Ich habe ein Formular, welches ich per Ajax an den Server senden möchte, dieser überprüft die Daten und gibt bei Bedarf ein Zusammenfassung der Fehler aus, wobei das Formular  [...]]]></description>
			<content:encoded><![CDATA[<p>So langsam sammel ich meine Erfahrung mit <a href="http://www.welt-held.de/category/asp-net-mvc">ASP.NET MVC</a>, gute sowie schlechte.<br />
Da kommen wir mal zu meinem heutigen Problem. Ich habe ein Formular, welches ich per Ajax an den Server senden möchte, dieser überprüft die Daten und gibt bei Bedarf ein Zusammenfassung der Fehler aus, wobei das Formular ausgefüllt bleibt.</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;%@ Control Language=&quot;C#&quot; Inherits=&quot;System.Web.Mvc.ViewUserControl&lt;MyModel&gt;&quot; %&gt;
&lt;%= Html.ValidationSummary(); %&gt;
&lt;% using(Ajax.BeginForm(&quot;MyAction&quot;, new AjaxOptions { UpdateTargetId = &quot;fromDiv&quot; })) { %&gt;
Benutzername: &lt;%= Html.Textbox(&quot;username&quot;, Model.Username) %&gt;
&lt;input type=&quot;submit&quot; value=&quot;Absenden&quot; /&gt;
&lt;% } %&gt;</pre>
<p>Hier mal als Beispiel. Das ganze wurde dann an den Server gesendet, validiert und bei Bedarf halt mit Fehlermeldung noch mal ausgegeben.</p>
<pre class="brush: csharp; title: ; notranslate">
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult MyAction(string username) {
   if(this.UsernameExists(username)) {
      this.ModelState.AddModelError(&quot;errorUsername&quot;,&quot;Benutzername existiert schon!&quot;);
      MyModel user = new MyModel { Username = username + &quot;1&quot; };
      return PartialView(&quot;MyControl&quot;, user);
   }
   //...
}
</pre>
<p>So, angenommen wir geben nun einen Benutzername ein, welcher schon existiert. Dann sollte nun das Formular erscheinen, oben die ValidationSummery und als Benutzername vorgeblendet der von eben + 1. Möge man meinen, ist aber nicht so. Es erscheint zwar die ValidationSummary aber nicht die 1 hinter dem Namen.<br />
Ich hab das gute Teil rauf und runter debugt, in div. Browsern, bei allen das selbe Ergebnis. Im Model steht der richtige Wert, er wird aber nicht angezeigt.<br />
Eine Erklärung konnte ich nicht finden, aber eine Lösung.</p>
<p>Das Problem liegt an Html.Textbox(). Es scheint, als ob er das Objekt im Cache vorhält. Da werden ganz böse Erinnerungen an ViewState wach. Lösen konnte ich das Problem, in dem ich die Textbox manuell erstelle:</p>
<pre class="brush: csharp; title: ; notranslate">Benutzername: &lt;input type=&quot;text&quot; name=&quot;username&quot; value=&quot;&lt;%= Html.Encode(Model.Username) %/&gt;&quot; /&gt;</pre>
<p>Aber auf so etwas muss man erstmal kommen. Löst ja eigentlich nicht das Problem sondern nur umgangen. Vielleicht find ich ja noch mal einen Beitrag dazu in der MSDN oder jemand hinterlässt mir einen schönen Link in den Kommentaren.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1429-html-textbox-und-ajax-beginform.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1429-html-textbox-und-ajax-beginform.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1429-html-textbox-und-ajax-beginform.html"  data-text="Html.Textbox und Ajax.BeginForm" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1429&amp;md5=386c6bcd78cb784af53c2d83dfe202e3" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1429-html-textbox-und-ajax-beginform.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1429&amp;md5=386c6bcd78cb784af53c2d83dfe202e3" type="text/html" />
	</item>
		<item>
		<title>Linq Probleme mit ToString()</title>
		<link>http://www.welt-held.de/1425-linq-probleme-mit-tostring.html</link>
		<comments>http://www.welt-held.de/1425-linq-probleme-mit-tostring.html#comments</comments>
		<pubDate>Wed, 18 Nov 2009 10:28:49 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[fehlermeldung]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[tostring()]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1425</guid>
		<description><![CDATA[Ich finde Linq ja eine echt tolle Sache. Damit kann man schöne lesbare Statements formulieren, welche eigentlich sehr logisch sind.
Heute wollte ich anhand einer Datenbank eine &#60;select&#62;-Liste in einem ASP.NET MVC Projekt erstellen.
Dazu wollte ich die Html.DropDownList() verwenden, welche eine  [...]]]></description>
			<content:encoded><![CDATA[<p>Ich finde Linq ja eine echt tolle Sache. Damit kann man schöne lesbare Statements formulieren, welche eigentlich sehr logisch sind.</p>
<p>Heute wollte ich anhand einer Datenbank eine <strong>&lt;select&gt;</strong>-Liste in einem ASP.NET MVC Projekt erstellen.<br />
Dazu wollte ich die <strong>Html.DropDownList()</strong> verwenden, welche eine Liste des Typen &#8220;<a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.selectlistitem.aspx">SelectListItem</a>&#8221; verlangt. Dies wollte ich schnell mit Linq erstellen:</p>
<pre class="brush: csharp; title: ; notranslate">
var daten = from datensatz in this.datenSet select new SelectListItem {
Value = datensatz.Id.ToString(),
Text = datensatz.Name
}
</pre>
<p>Das hat so nicht geklappt, Fehlermeldung lautete:</p>
<blockquote><p>&#8216;LINQ to Entities&#8217; erkennt die Methode &#8216;System.String ToString()&#8217; nicht, und diese Methode kann nicht in einen Speicherausdruck übersetzt werden.</p></blockquote>
<p>Zudem wurde mir als fehlerauslösende Zeile die Html.DropDownList() angezeigt. Das Problem liegt an dem &#8220;datensatz.Id.ToString()&#8221;, obwohl es vom Visual Studio direkt vorgeschlagen wird. Auch andere casting Methoden ((string) vorschreiben, Convert.ToString()) waren nicht erfolgreich.<br />
Per Google kam ich auf diesem <a href="http://stackoverflow.com/questions/1066760/problem-with-converting-int-to-string-in-linq-to-entities/1069078#1069078">Beitrag</a>, welcher die Lösung enthielt. Ich schaufel die Daten vorher in ein Dictionary und gebe sie von dort aus, da das Dictionary die ToString() Methode kennt.</p>
<pre class="brush: csharp; title: ; notranslate">var foo = from datensatz in this.datenSet.ToDictionary(i =&gt; i.Id, i =&gt; i.Name)
          select new SelectListItem
                     {
                         Text = datensatz.Value,
                         Value = datensatz.Key.ToString()
                     };</pre>
<p>Diese Lösung klappt hier nun ganz gut, da wir wirklich nur einen Key und ein Value haben. Spätestens bei drei Werten kann man nicht über ein Dictionary gehen. Da müssen die Daten dann vorher in eine &#8220;Dummy&#8221;-Klasse gepumpt werden, welche die Wertetypen so annimmt. Nicht die schönste Weg, aber ein besserer fällt mir spontan nicht ein.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1425-linq-probleme-mit-tostring.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1425-linq-probleme-mit-tostring.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1425-linq-probleme-mit-tostring.html"  data-text="Linq Probleme mit ToString()" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1425&amp;md5=991f115b5e2d6d70c924b46fd50f16b0" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1425-linq-probleme-mit-tostring.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1425&amp;md5=991f115b5e2d6d70c924b46fd50f16b0" type="text/html" />
	</item>
		<item>
		<title>ADO.NET Foreign Key = null selektieren</title>
		<link>http://www.welt-held.de/1418-ado-net-foreign-key-null-selektieren.html</link>
		<comments>http://www.welt-held.de/1418-ado-net-foreign-key-null-selektieren.html#comments</comments>
		<pubDate>Fri, 13 Nov 2009 08:29:16 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ado.net]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1418</guid>
		<description><![CDATA[Ich habe zwei Tabellen erstellt, welche über einen Foreign Key miteinander verknüpft sind.
Nun habe ich über den Wizard ein &#8220;ADO.NET Entity Data Model&#8221; erstellt und die beiden Tabellen ausgewählt. Richtig hat er die Relation zwischen Tabelle A und Tabelle B mit 0..1 &#8211; * erkannt.
Nun wollte ich alle  [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe zwei Tabellen erstellt, welche über einen Foreign Key miteinander verknüpft sind.<br />
Nun habe ich über den Wizard ein &#8220;ADO.NET Entity Data Model&#8221; erstellt und die beiden Tabellen ausgewählt. Richtig hat er die Relation zwischen Tabelle A und Tabelle B mit 0..1 &#8211;> * erkannt.</p>
<p>Nun wollte ich alle Einträge aus Tabelle B, welche keine Verknüpfung zu Tabelle A haben, sprich in der Spalte den Wert &#8220;NULL&#8221; besitzen.<br />
Leider ist es nicht möglich, die Spalte im Code anzusteuern.<br />
<a href="http://www.welt-held.de/wp-upload/Foreignkey1.jpg"><img src="http://www.welt-held.de/wp-upload/Foreignkey1.jpg" alt="Foreignkey1" title="Foreignkey1" width="597" height="64" class="alignnone size-full wp-image-1419" /></a></p>
<p>Die Lösung ist hier eigentlich ganz einfach, meine erste Idee war auch richtig, hat aber nicht &#8220;geklappt&#8221;, da ich mir die falsche Variable ausgeben lassen habe.<br />
Da durch die 0..1 &#8211;> * Beziehung im &#8220;AdressbuchUser&#8221;-Objekt automatisch ein (in dem Fall) &#8220;AdressbuchFirmen&#8221;-Objekt angelegt wird, welches die Daten aus der anderen Tabelle enthält, braucht man dies nur auf null zu prüfen, schon funktioniert die ganze Geschichte.</p>
<p><a href="http://www.welt-held.de/wp-upload/Foreignkey2.jpg"><img src="http://www.welt-held.de/wp-upload/Foreignkey2.jpg" alt="Foreignkey2" title="Foreignkey2" width="610" height="49" class="alignnone size-full wp-image-1420" /></a></p>
<p>Weitere Informationen zu dem Thema findet ihr <a href="http://thedatafarm.com/blog/data-access/entity-data-model-associations-where-s-my-foreign-key/">hier</a>.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1418-ado-net-foreign-key-null-selektieren.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1418-ado-net-foreign-key-null-selektieren.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1418-ado-net-foreign-key-null-selektieren.html"  data-text="ADO.NET Foreign Key = null selektieren" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1418&amp;md5=9e358ed76f1144e0f6b6c121d935c052" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1418-ado-net-foreign-key-null-selektieren.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1418&amp;md5=9e358ed76f1144e0f6b6c121d935c052" type="text/html" />
	</item>
		<item>
		<title>ASP.NET MVC unter IIS 5.1 / 6</title>
		<link>http://www.welt-held.de/1410-asp-net-mvc-unter-iis-5-1-6.html</link>
		<comments>http://www.welt-held.de/1410-asp-net-mvc-unter-iis-5-1-6.html#comments</comments>
		<pubDate>Tue, 03 Nov 2009 20:28:47 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[iis 5.1]]></category>
		<category><![CDATA[iis 6]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[windows xp]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1410</guid>
		<description><![CDATA[Ein kleines Problem von ASP.NET MVC liegt darin, dass es nur unter dem IIS7 läuft. Für den IIS7 braucht man aber Windows Server 2008 R2 bzw. Windows 7. Was ist wenn man dafür aber eben mal keine Lizenz hat sondern auf XP ausweichen muss? Dann muss man sich mit einem Workaround behelfen.
Einige habe  [...]]]></description>
			<content:encoded><![CDATA[<p>Ein kleines Problem von ASP.NET MVC liegt darin, dass es nur unter dem IIS7 läuft. Für den IIS7 braucht man aber Windows Server 2008 R2 bzw. Windows 7. Was ist wenn man dafür aber eben mal keine Lizenz hat sondern auf XP ausweichen muss? Dann muss man sich mit einem Workaround behelfen.</p>
<p>Einige habe ich auf <a href="http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/">codeville.net</a> gefunden.<br />
Ausprobiert habe ich selber nur &#8220;Option 2&#8243;. Dazu änderte ich in der Global.asax die Default-MapRoute:</p>
<pre class="brush: csharp; title: ; notranslate">
routes.MapRoute(
    &quot;Default&quot;,                                                           // Route name
    &quot;{controller}.aspx/{action}/{id}&quot;,                           // URL with parameters
    new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = &quot;&quot; }  // Parameter defaults
);</pre>
<p>Sofern im Projekt die Links über z.B. Html.ActionLink() erstellt werden, läuft das Projekt nun ohne weitere Probleme. Die Urls sehen nun so aus: http://localhost/Home.aspx/Index/123<br />
Ist zwar nicht so der Hit, aber die einfachste Möglichkeit ohne viel gefrickel.</p>
<p>Aber etwas solltet ihr beachten. Sofern ihr die Authentifizierung nutzt, sollte ihr in der Web.config den Pfad zur Loginurl ändern:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;forms loginUrl=&quot;~/Account.aspx/LogOn&quot; timeout=&quot;2880&quot; /&gt;
</pre>
<p>Dann klappt es auch mit dem Nachbarn <img src='http://welt-held.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1410-asp-net-mvc-unter-iis-5-1-6.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1410-asp-net-mvc-unter-iis-5-1-6.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1410-asp-net-mvc-unter-iis-5-1-6.html"  data-text="ASP.NET MVC unter IIS 5.1 / 6" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1410&amp;md5=76abf83ed3aae719f76220e14eba8719" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1410-asp-net-mvc-unter-iis-5-1-6.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1410&amp;md5=76abf83ed3aae719f76220e14eba8719" type="text/html" />
	</item>
		<item>
		<title>ASP.NET MVC Design</title>
		<link>http://www.welt-held.de/1408-asp-net-mvc-design.html</link>
		<comments>http://www.welt-held.de/1408-asp-net-mvc-design.html#comments</comments>
		<pubDate>Tue, 03 Nov 2009 07:37:32 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1408</guid>
		<description><![CDATA[Wer im Designen seiner Webseiten so unfähig ist wie meiner einer, der findet hier einige vorgefertigte MVC Designs.

			
			
			
			
			
			
			Tweet
						
			]]></description>
			<content:encoded><![CDATA[<p>Wer im Designen seiner Webseiten so unfähig ist wie meiner einer, der findet <a href="http://www.asp.net/mvc/gallery/default.aspx">hier</a> einige vorgefertigte MVC Designs.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1408-asp-net-mvc-design.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1408-asp-net-mvc-design.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1408-asp-net-mvc-design.html"  data-text="ASP.NET MVC Design" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1408&amp;md5=440a39c25b9a67da9463b6a8391322c7" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1408-asp-net-mvc-design.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1408&amp;md5=440a39c25b9a67da9463b6a8391322c7" type="text/html" />
	</item>
		<item>
		<title>ASP.NET MVC &#8211; Was benötige ich?</title>
		<link>http://www.welt-held.de/1363-asp-net-mvc-was-benotige-ich.html</link>
		<comments>http://www.welt-held.de/1363-asp-net-mvc-was-benotige-ich.html#comments</comments>
		<pubDate>Thu, 29 Oct 2009 19:44:16 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.welt-held.de/?p=1363</guid>
		<description><![CDATA[Um ASP.NET MVC Projekte in Visual Studio 2008 erstellen zu können, benötigt ihr eigentlich nicht viel.
Am einfachsten nutzt ihr dazu den Web Platform Installer von Microsoft.
Nachdem ihr das kleine Programm gestartet habe, wählt den Menüpunkt &#8220;Webplattform&#8221; aus und wählt unter &#8220;Framework und  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.welt-held.de/wp-upload/Aspnetmvcinstallieren.jpg"><img src="http://www.welt-held.de/wp-upload/Aspnetmvcinstallieren-150x150.jpg" alt="ASP.NET MVC Installation" title="ASP.NET MVC Installation" width="150" height="150" class="alignright size-thumbnail wp-image-1364" /></a>Um ASP.NET MVC Projekte in Visual Studio 2008 erstellen zu können, benötigt ihr eigentlich nicht viel.<br />
Am einfachsten nutzt ihr dazu den <a href="http://go.microsoft.com/fwlink/?LinkID=148931&#038;clcid=0x409">Web Platform Installer</a> von Microsoft.<br />
Nachdem ihr das kleine Programm gestartet habe, wählt den Menüpunkt &#8220;Webplattform&#8221; aus und wählt unter &#8220;Framework und Laufzeiten&#8221; die Option anpassen.<br />
Hier müsst ihr &#8220;ASP.NET MVC 1.0&#8243; auswählen und auf Installieren klicken.</p>
<p><a href="http://www.welt-held.de/wp-upload/aspnetmvcinvisualstudio.jpg"><img src="http://www.welt-held.de/wp-upload/aspnetmvcinvisualstudio-150x150.jpg" alt="ASP.NET MVC Projekt in Visual Studio 2008" title="ASP.NET MVC Projekt in Visual Studio 2008" width="150" height="150" class="alignleft size-thumbnail wp-image-1365" /></a> Von nun an könnt ihr in Visual Studio, wenn ihr ein neues Projekt startet unter &#8220;Visual C#&#8221; &#8211;> &#8220;Web&#8221; ein ASP.NET MVC Projekt starten.</p>
<div style="clear:both;">&nbsp;</div>
<p>Das wars eigentlich schon <img src='http://welt-held.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.welt-held.de%2F1363-asp-net-mvc-was-benotige-ich.html&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://www.welt-held.de/1363-asp-net-mvc-was-benotige-ich.html"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.welt-held.de/1363-asp-net-mvc-was-benotige-ich.html"  data-text="ASP.NET MVC &#8211; Was benötige ich?" data-count="horizontal" data-via="trashar">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div> <p><a href="http://welt-held.de/?flattrss_redirect&amp;id=1363&amp;md5=b462abe019702e441024dd9f00bc6257" title="Flattr" target="_blank"><img src="http://welt-held.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.welt-held.de/1363-asp-net-mvc-was-benotige-ich.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="http://welt-held.de/?flattrss_redirect&amp;id=1363&amp;md5=b462abe019702e441024dd9f00bc6257" type="text/html" />
	</item>
	</channel>
</rss>

