<?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>Trying to use an SPWeb object that has been closed or disposed and is no longer valid. arşivleri - Yunus Emre Araç</title>
	<atom:link href="https://www.yunusemrearac.com/tag/trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.yunusemrearac.com/tag/trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid/</link>
	<description>SharePoint Consultant &#124; Microsoft 365 &#124; SharePoint Server &#38; Online</description>
	<lastBuildDate>Thu, 09 May 2019 13:54:49 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://www.yunusemrearac.com/wp-content/uploads/2014/11/MetroUI_VisualStudio_2012-545c8860_site_icon-32x32.png</url>
	<title>Trying to use an SPWeb object that has been closed or disposed and is no longer valid. arşivleri - Yunus Emre Araç</title>
	<link>https://www.yunusemrearac.com/tag/trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">67294213</site>	<item>
		<title>SharePoint Webpart &#8220;Trying to use an SPWeb object that has been closed or disposed and is no longer valid.&#8221; Hatası ve Çözümü</title>
		<link>https://www.yunusemrearac.com/2019/05/09/sharepoint-webpart-trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid-hatasi-ve-cozumu/</link>
					<comments>https://www.yunusemrearac.com/2019/05/09/sharepoint-webpart-trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid-hatasi-ve-cozumu/#respond</comments>
		
		<dc:creator><![CDATA[yunusemrearac]]></dc:creator>
		<pubDate>Thu, 09 May 2019 13:54:49 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Trying to use an SPSite]]></category>
		<category><![CDATA[Trying to use an SPSite object that has been closed or disposed and is no longer valid.]]></category>
		<category><![CDATA[Trying to use an SPWeb]]></category>
		<category><![CDATA[Trying to use an SPWeb object that has been closed or disposed and is no longer valid.]]></category>
		<category><![CDATA[WebPart]]></category>
		<guid isPermaLink="false">http://yunusemrearac.com/?p=1930</guid>

					<description><![CDATA[<p>Merhaba arkadaşlar bugün sizlere yazmış olduğunuz webpart uygulamasında alacağınız &#8220;Trying to use an SPWeb object that has been closed or disposed and is no longer&#8230;</p>
<p>The post <a href="https://www.yunusemrearac.com/2019/05/09/sharepoint-webpart-trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid-hatasi-ve-cozumu/">SharePoint Webpart &#8220;Trying to use an SPWeb object that has been closed or disposed and is no longer valid.&#8221; Hatası ve Çözümü</a> appeared first on <a href="https://www.yunusemrearac.com">Yunus Emre Araç</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Merhaba arkadaşlar bugün sizlere yazmış olduğunuz webpart uygulamasında alacağınız &#8220;Trying to use an SPWeb object that has been closed or disposed and is no longer valid.&#8221; hatasından ve bu hatanın çözümünden bahsedeceğim.</p>
<p>Bu hata sadece SPWeb için değil aynı zamanda SPSite içinde verebilmektedir.</p>
<p><a href="http://yunusemrearac.com/wp-content/uploads/2019/05/error-SPWeb.png"><img fetchpriority="high" decoding="async" class="size-full wp-image-1931 aligncenter" src="https://yunusemrearac.com/wp-content/uploads/2019/05/error-SPWeb.png" alt="" width="891" height="298" srcset="https://www.yunusemrearac.com/wp-content/uploads/2019/05/error-SPWeb.png 891w, https://www.yunusemrearac.com/wp-content/uploads/2019/05/error-SPWeb-300x100.png 300w, https://www.yunusemrearac.com/wp-content/uploads/2019/05/error-SPWeb-768x257.png 768w" sizes="(max-width: 891px) 100vw, 891px" /></a></p>
<p>Yukarıdaki gibi bir hata ekranı ile karşılaşmanız durumunda kod tarafında ufak bir güncelleme ile bu sorunu çözebilirsiniz.</p>
<p>Bu hatasının sebebi ise kod tarafında SPSite ya da SPWeb kısımlarını using ile kullanmanızdan kaynaklı bir hatadır. Using ile kullandığınız zaman bu değişkenler asla iptal edilmiyor ve bir sonraki web bölümüne geçiyorlar. Ama sharepoint bunları iptal etmek istediği için ve edilemediği içinde hata vermektedir.</p>
<p>Kod tarafında ise</p><pre class="urvanov-syntax-highlighter-plain-tag">using (SPSite site = SPContext.Current.Site) 
{

}</pre><p>kısmını</p><pre class="urvanov-syntax-highlighter-plain-tag">SPSite site = SPContext.Current.Site;</pre><p>olacak şekilde ve</p><pre class="urvanov-syntax-highlighter-plain-tag">using (SPWeb web = SPContext.Current.Site.OpenWeb()) 
{

}</pre><p>kısmını da</p><pre class="urvanov-syntax-highlighter-plain-tag">SPWeb web = SPContext.Current.Site.OpenWeb();</pre><p>olacak şekilde revize edilmesi gerekmektedir.</p>
<p>The post <a href="https://www.yunusemrearac.com/2019/05/09/sharepoint-webpart-trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid-hatasi-ve-cozumu/">SharePoint Webpart &#8220;Trying to use an SPWeb object that has been closed or disposed and is no longer valid.&#8221; Hatası ve Çözümü</a> appeared first on <a href="https://www.yunusemrearac.com">Yunus Emre Araç</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.yunusemrearac.com/2019/05/09/sharepoint-webpart-trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid-hatasi-ve-cozumu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1930</post-id>	</item>
	</channel>
</rss>
