<?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>dattaproffs</title>
	<atom:link href="https://www.dattaproffs.se/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dattaproffs.se</link>
	<description>ninjafying interwebz</description>
	<lastBuildDate>Sat, 06 Dec 2025 12:04:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.2.24</generator>

<image>
	<url>https://www.dattaproffs.se/wp-content/uploads/2019/01/cropped-DattaProffs-röd@4x-1-32x32.png</url>
	<title>dattaproffs</title>
	<link>https://www.dattaproffs.se</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Why Address Validation APIs Are Essential for Modern E-Commerce</title>
		<link>https://www.dattaproffs.se/2025/12/06/why-address-validation-apis-are-essential-for-modern-e-commerce/</link>
				<comments>https://www.dattaproffs.se/2025/12/06/why-address-validation-apis-are-essential-for-modern-e-commerce/#respond</comments>
				<pubDate>Sat, 06 Dec 2025 12:04:49 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[address validation]]></category>

		<guid isPermaLink="false">https://www.dattaproffs.se/?p=144</guid>
				<description><![CDATA[<p>Incorrect addresses cause delivery failures, returns, and unhappy customers. For businesses operating in Sweden, keeping address data accurate is critical—thousands of changes occur in the Swedish address and postal code system each year. The Hidden Cost of Bad Addresses Bad addresses lead to: Failed deliveries and return shipping costs Lost perishable goods Customer frustration and <a class="read-more" href="https://www.dattaproffs.se/2025/12/06/why-address-validation-apis-are-essential-for-modern-e-commerce/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2025/12/06/why-address-validation-apis-are-essential-for-modern-e-commerce/">Why Address Validation APIs Are Essential for Modern E-Commerce</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[
<hr class="wp-block-separator"/>



<h1></h1>



<p>Incorrect addresses cause delivery failures, returns, and unhappy customers. For businesses operating in Sweden, keeping address data accurate is critical—thousands of changes occur in the Swedish address and postal code system each year.</p>



<h2>The Hidden Cost of Bad Addresses</h2>



<p>Bad addresses lead to:</p>



<ul><li>Failed deliveries and return shipping costs</li><li>Lost perishable goods</li><li>Customer frustration and lost sales</li><li>Manual corrections and system downtime</li></ul>



<p>According to <a href="https://www.postnord.se/">research from the Swedish Post</a>, address errors cost Swedish businesses millions annually in unnecessary shipping and handling.</p>



<h2>How Address Validation APIs Solve This Problem</h2>



<p>Modern address validation APIs like <a href="https://adresser.online">Adresser online</a> provide real-time validation and autocomplete. As users type, the API suggests correct addresses, reducing errors and speeding up form completion.</p>



<h3>Key Benefits:</h3>



<ol><li>Real-time validation: Addresses are checked against official Swedish registers as users type</li><li>Autocomplete functionality: Users select from verified suggestions instead of typing manually</li><li>Reduced cart abandonment: Faster, easier forms improve conversion rates</li><li>Lower shipping costs: Fewer failed deliveries mean lower operational costs</li></ol>



<h2>Beyond Basic Address Validation</h2>



<p>Advanced address APIs offer more than validation. For example, <a href="https://adresser.online">Adresser online&#8217;s API</a> includes:</p>



<ul><li>Geodata: Coordinates and geographic attributes for each address</li><li>Network areas: Critical for electricity retailers who need to identify the correct network operator</li><li>Price zones: Essential for accurate pricing in regulated markets</li></ul>



<p>This is especially valuable for electricity retailers in Sweden, who must identify the correct network area and operator for accurate billing—information that&#8217;s automatically provided with each validated address.</p>



<h2>Integration Made Simple</h2>



<p>Modern address validation APIs are designed for easy integration. Most developers can implement address validation and autocomplete in their web forms, e-commerce platforms, or internal systems within hours. The <a href="https://adresser.online/api/docs">REST API documentation</a> typically includes clear examples and code samples.</p>



<h2>Data Quality Matters</h2>



<p>The effectiveness of an address validation API depends on data quality. Look for providers that:</p>



<ul><li>Update data regularly (weekly updates are ideal)</li><li>Source data from official Swedish registers</li><li>Maintain high accuracy rates</li><li>Provide comprehensive coverage of Swedish addresses</li></ul>



<h2>Getting Started</h2>



<p>If you&#8217;re building a Swedish e-commerce site, booking system, or any application requiring address input, consider integrating an address validation API. Many providers offer free trials, so you can test the functionality before committing.</p>



<p>For businesses operating in Sweden, <a href="https://adresser.online">Adresser online</a> provides a comprehensive solution with weekly data updates and additional features like network area identification for electricity retailers.</p>



<h2>Conclusion</h2>



<p>Address validation APIs are no longer optional for serious e-commerce operations. They reduce costs, improve customer experience, and ensure accurate deliveries. As the Swedish address system continues to evolve, having an automated validation system becomes increasingly important.</p>



<p>Whether you&#8217;re running a small web shop or a large enterprise system, investing in address validation technology pays for itself through reduced shipping errors and improved customer satisfaction.</p>



<hr class="wp-block-separator"/>



<p><strong>Resources:</strong></p>



<ul><li>Learn more about <a href="https://adresser.online/about">address validation best practices</a></li><li><a href="https://adresser.online/demo">Try the demo</a> to see address autocomplete in action</li><li><a href="https://adresser.online/api/docs">View API documentation</a> for integration guides</li></ul>



<hr class="wp-block-separator"/>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2025/12/06/why-address-validation-apis-are-essential-for-modern-e-commerce/">Why Address Validation APIs Are Essential for Modern E-Commerce</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2025/12/06/why-address-validation-apis-are-essential-for-modern-e-commerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Customize header for JwtBearer in asp.net core 2.2.</title>
		<link>https://www.dattaproffs.se/2019/09/17/customize-header-for-jwtbearer-in-asp-net-core/</link>
				<comments>https://www.dattaproffs.se/2019/09/17/customize-header-for-jwtbearer-in-asp-net-core/#respond</comments>
				<pubDate>Tue, 17 Sep 2019 19:46:51 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[asp.net core]]></category>
		<category><![CDATA[Authentication]]></category>

		<guid isPermaLink="false">https://www.dattaproffs.se/?p=137</guid>
				<description><![CDATA[<p>So we were upgrading to asp.net core, the old system where using a custom jwt validation. Since asp.net core Authentication comes with a built in AothenticationBuilder for Jwt we decided to use that one instead (seems reasonable right?) One thing was that the old system where not using the Authorization header and where accepting with <a class="read-more" href="https://www.dattaproffs.se/2019/09/17/customize-header-for-jwtbearer-in-asp-net-core/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2019/09/17/customize-header-for-jwtbearer-in-asp-net-core/">Customize header for JwtBearer in asp.net core 2.2.</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[
<p>So we were upgrading to asp.net core, the old system where using a custom jwt validation. Since asp.net  core Authentication comes with a built in AothenticationBuilder for Jwt we decided to use that one instead (seems reasonable right?)</p>



<p>One thing was that the old system where not using the Authorization header and where accepting with or without <code>Bearer </code> first.  </p>



<p>So we needed a way to look at the custom header for a token and forward it to asp.net Authentication. Of course there is a simple solution to this. Here it is:</p>



<pre class="crayon-plain-tag">services.AddAuthentication()
.AddJwtBearer(options =&gt;
                {
                    options.Events = new JwtBearerEvents
                    {
                        OnMessageReceived = ctx =&gt;
                        {
                            if (ctx.Request.Headers.ContainsKey(&quot;SpecialApiKey&quot;))
                            {
                                var bearerToken = ctx.Request.Headers[&quot;SpecialApiKey&quot;].ElementAt(0);
                                var token = bearerToken.StartsWith(&quot;Bearer &quot;) ? bearerToken.Substring(7) : bearerToken;
                                ctx.Token = token;
                            }
                            return Task.CompletedTask;
                        }
                    };
                });</pre>



<p>We simply add a new callback to <code>OnMessageReceived</code> in the <code>Events</code>.</p>



<p>We look for a header with the name <code>SpecialApiKey</code> then we see if it starts with Bearer and if so we strip that part out.</p>



<p>That&#8217;s all. Pretty smooth right?</p>



<p>Until next time, have a good one.</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2019/09/17/customize-header-for-jwtbearer-in-asp-net-core/">Customize header for JwtBearer in asp.net core 2.2.</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2019/09/17/customize-header-for-jwtbearer-in-asp-net-core/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>depricating current version of emailstuff api</title>
		<link>https://www.dattaproffs.se/2018/07/01/depricating-current-version-of-emailstuff-api/</link>
				<comments>https://www.dattaproffs.se/2018/07/01/depricating-current-version-of-emailstuff-api/#respond</comments>
				<pubDate>Sun, 01 Jul 2018 21:59:56 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[blacklists]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[senderbase]]></category>
		<category><![CDATA[senderscore]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=107</guid>
				<description><![CDATA[<p>Right now we have a free api emailstuff (see previous post) for looking up talos reputation (former senderbase), senderscore, reputation authority and blacklists. This api have been used a lot by people and companies and that&#8217;s really cool to see. What&#8217;s not so cool to see is that the users (often big companies with a lot of <a class="read-more" href="https://www.dattaproffs.se/2018/07/01/depricating-current-version-of-emailstuff-api/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2018/07/01/depricating-current-version-of-emailstuff-api/">depricating current version of emailstuff api</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>Right now we have a free api <a href="http://emailstuff.io/api-docs/">emailstuff </a>(<a href="http://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/">see previous post</a>) for looking up talos reputation (former senderbase), senderscore, reputation authority and blacklists. This api have been used a lot by people and companies and that&#8217;s really cool to see. What&#8217;s not so cool to see is that the users (often big companies with a lot of ips) that uses the api on a daily basis just hammer it like crazy and not folowing the rate limits. So that makes us take action, either we need to start charging <strong>a lot</strong> of money (wich we do not wan&#8217;t) so we decided to take another path.</p>
<p>We are going to depricate the current api and will be releasing a new one in a few weeks. The new api will be fast and i mean really fast. We are right now looking at lookup for 30 blacklists, senderbase, senderscore, reputation authority in under 100ms.</p>
<p>But that&#8217;s not all, we will include cyren lookups in the results also, as far as i know we will be the only api supporting this, isn&#8217;t that amazing (tv-shop i know)</p>
<p>So if you are interested in continuing using this service you need to send an email to emailstuff[at]dattaproffs.se and we will get you up and running.</p>
<p>The current api will be closed 31/7/2018.</p>
<p>Best regards<br />
Fredrik Berggren</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2018/07/01/depricating-current-version-of-emailstuff-api/">depricating current version of emailstuff api</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2018/07/01/depricating-current-version-of-emailstuff-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Api for talos reputation (previous senderbase.org), senderscore, reputation authority and blacklists.</title>
		<link>https://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/</link>
				<comments>https://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/#comments</comments>
				<pubDate>Sun, 29 Oct 2017 16:23:19 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[email]]></category>
		<category><![CDATA[reputation]]></category>
		<category><![CDATA[senderscore]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=81</guid>
				<description><![CDATA[<p>*UPDATE* Updated with a swagger docs page here http://emailstuff.io/api-docs/ &#8212;&#8212; So with the senderbase rdns lookup discontinued i needed a way to check it by code.  Earlier i wrote a post about how to query it with c# and HttpClient that was not a very solid solution. So i created emailstuff.io a api for checking, senderbase (now talos reputation), <a class="read-more" href="https://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/">Api for talos reputation (previous senderbase.org), senderscore, reputation authority and blacklists.</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>*UPDATE*<br />
Updated with a swagger docs page here <a href="http://emailstuff.io/api-docs/">http://emailstuff.io/api-docs/</a><br />
&#8212;&#8212;</p>
<p>So with the senderbase rdns lookup discontinued i needed a way to check it by code.  Earlier i wrote a post about how to query it with <a href="http://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/">c# and HttpClient </a>that was not a very solid solution. So i created <a href="http://emailstuff.io">emailstuff.io</a> a api for checking, senderbase (now talos reputation), senderscore, reputation authority and some blacklists.</p>
<p>For now it is not documented and a lot of features missing but it will be updated frequently next couple of weeks. Please add feature requests in the comments.</p>
<p>For now you can use these endpoints:</p>
<p>http://emailstuff.io/api/senderbase/[ipaddress]  returns Bad, Neutral or Good<br />
http://emailstuff.io/api/senderscore/[ipaddress] returns an int. -9999 = no data<br />
http://emailstuff.io/api/reputationauthority/[ipaddress] returns an int. -9999 = no data<br />
http://emailstuff.io/api/blacklist/[ipaddress] returns an object with the following information:</p><pre class="crayon-plain-tag">{
    "fwdReverseDnsMatch": true,
    "ptr": "mail1.mydomain.se.",
    "blacklistResult": [
        {
            "blacklist": "zen.spamhaus.org",
            "blacklist_url": "https://www.spamhaus.org/zen/",
            "listed": false,
            "ms": 36
        }]
}</pre><p>http://emailstuff.io/api/emailinfo/[emailaddress] returns an object with the following information:</p><pre class="crayon-plain-tag">{
    "emailAddress": "fredrik@dattaproffs.se",
    "name": "fredrik",
    "domain": "dattaproffs.se",
    "isValid": true,
    "isRoleAddress": false,
    "isDisposable": false,
    "hasMx": true
}</pre><p>These are subject to change both the endpoints and the data returned. But i will keep you posted on the blog and soon there will be a docs page for the API.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/">Api for talos reputation (previous senderbase.org), senderscore, reputation authority and blacklists.</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
							</item>
		<item>
		<title>Use correct ethernet adapter when using create react native app (CRNA)</title>
		<link>https://www.dattaproffs.se/2017/09/13/use-correct-ethernet-adapter-using-create-react-native-app-crna/</link>
				<comments>https://www.dattaproffs.se/2017/09/13/use-correct-ethernet-adapter-using-create-react-native-app-crna/#respond</comments>
				<pubDate>Wed, 13 Sep 2017 20:28:05 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[create-react-native-app]]></category>
		<category><![CDATA[react]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=75</guid>
				<description><![CDATA[<p>So i stumbled over a problem when creating a new react native app with CRNA (create-react-native-app)  which otherwise is amazing to get started fast  with prototyping and build ios apps on your windows machine. When you first create and run your app [crayon-6a1ba95c38c13035236052/] You will get a QR-code to scan with the expo app on <a class="read-more" href="https://www.dattaproffs.se/2017/09/13/use-correct-ethernet-adapter-using-create-react-native-app-crna/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/09/13/use-correct-ethernet-adapter-using-create-react-native-app-crna/">Use correct ethernet adapter when using create react native app (CRNA)</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>So i stumbled over a problem when creating a new react native app with <a href="https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html">CRNA</a> (create-react-native-app)  which otherwise is amazing to get started fast  with prototyping and build ios apps on your windows machine.</p>
<p>When you first create and run your app</p><pre class="crayon-plain-tag">create-react-native-app MyApp

cd MyApp

yarn start</pre><p>You will get a QR-code to scan with the expo app on your phone. The builder will bundle the javascript on the fly and preview the app on your phone with live reloading.</p>
<p>One problem tho, you need to be on the same network on your phone as the builder, well that&#8217;s not really a problem but it became a problem for me because i run a lot of VMs on my machine and have VirtualBox and Hyper-V installed and running.</p>
<p>This gives me a lot of virtual ethernet adapters and the builder just selects the first one. That gave me some random ip like 172.115.56.77:19000 and I&#8217;m not on that network on my phone.</p>
<p>So how do we fix this? You need to set the interface metric on the adapter you want to be first.</p>
<p><a href="http://www.dattaproffs.se/wp-content/uploads/2017/09/ethernet.gif"><img class="alignnone size-full wp-image-76" src="http://www.dattaproffs.se/wp-content/uploads/2017/09/ethernet.gif" alt="" width="692" height="627" /></a></p>
<p>After that is done you can just run yarn start again and now you will see that it&#8217;s the correct adapter.</p>
<p><a href="http://www.dattaproffs.se/wp-content/uploads/2017/09/crna.png"><img class="alignnone size-full wp-image-77" src="http://www.dattaproffs.se/wp-content/uploads/2017/09/crna.png" alt="" width="642" height="687" srcset="https://www.dattaproffs.se/wp-content/uploads/2017/09/crna.png 642w, https://www.dattaproffs.se/wp-content/uploads/2017/09/crna-280x300.png 280w" sizes="(max-width: 642px) 100vw, 642px" /></a></p>
<p>Happy coding!</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/09/13/use-correct-ethernet-adapter-using-create-react-native-app-crna/">Use correct ethernet adapter when using create react native app (CRNA)</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2017/09/13/use-correct-ethernet-adapter-using-create-react-native-app-crna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Public senderbase dns lookup is closed, here is how to look it up in c# using HttpClient and HtmlAgilityPack</title>
		<link>https://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/</link>
				<comments>https://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/#respond</comments>
				<pubDate>Sat, 06 May 2017 22:21:25 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=62</guid>
				<description><![CDATA[<p>*UPDATE* I have created an API for all sorts of email and ip related info, read more here Api for talos reputation (previous senderbase.org), senderscore, reputation authority and blacklists. So the answer from SenderBase is that public access to their DNS lookup (rf.senderbase.org) is closed. That&#8217;s a shame it was really handy to have a running <a class="read-more" href="https://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/">Public senderbase dns lookup is closed, here is how to look it up in c# using HttpClient and HtmlAgilityPack</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>*UPDATE*<br />
I have created an API for all sorts of email and ip related info, read more here <a href="http://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/">Api for talos reputation (previous senderbase.org), senderscore, reputation authority and blacklists.</a></p>
<p>So the answer from SenderBase is that public access to their DNS lookup (rf.senderbase.org) is closed. That&#8217;s a shame it was really handy to have a running service looking that up a few times a day.</p>
<p>So for now i&#8217;m using this code to look it up via HttpClient, it&#8217;s not as sufficient as DNS but it does the trick. If you are going to use this i do not recommend running it to often. According to the TOS you may <strong>not</strong>:</p>
<ul>
<li>Exceed 1000 queries per day per IP or subnet</li>
<li>use any measure to circumvent this personal and non-commercial use limitation or other requirements in these Terms; or</li>
<li>modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer or sell the Materials or any information, software, products or features obtained from SenderBase.</li>
</ul>
<p>And then it basically says &#8220;do not do bad stuff&#8221;.</p>
<p>I&#8217;m using <a href="https://www.microsoft.com/net/core">ASP.NET Core</a> and a <a href="https://www.nuget.org/packages/DevZH.HtmlAgilityPack/1.4.9.4-final">fork of HtmlAgilityPack</a> (because the <a href="https://www.nuget.org/packages/HtmlAgilityPack">official</a> one does not have support for core yet)</p>
<p>I&#8217;m going to do this quick and dirty from the command line you can follow along using commandline, VS or your favorite tool.</p>
<p>Create a new console application</p><pre class="crayon-plain-tag">dotnet new console -n senderbaselookup</pre><p>Add the following package in *.csproj</p><pre class="crayon-plain-tag">&lt;ItemGroup&gt;
    &lt;PackageReference Include="DevZH.HtmlAgilityPack" Version="1.4.9.4-final" /&gt;
  &lt;/ItemGroup&gt;</pre><p>Restore packages</p><pre class="crayon-plain-tag">dotnet restore</pre><p>Replace program.cs with this</p><pre class="crayon-plain-tag">using System;
using System.Net;
using System.Net.Http;
using HtmlAgilityPack;

namespace senderbaselookup
{
    class Program
    {
        static void Main(string[] args)
        {
            var ip = args[0];
            var result = "unknown";
            try
            {
                var cookies = new CookieContainer();
                cookies.Add(new Uri("http://www.senderbase.org"), new Cookie("tos_accepted", "1330588800", "/"));

                using (var handler = new HttpClientHandler() { CookieContainer = cookies })
                using (var client = new HttpClient(handler))
                {
                    var response = client.GetStringAsync("https://www.senderbase.org/lookup/?search_string=" + ip);

                    var doc = new HtmlDocument();
                    doc.LoadHtml(response.Result);
                    var documentNode = doc.DocumentNode;
                    result = documentNode.SelectSingleNode("//table[@class='tabular info_table']//tr[4]/td[2]/div[@class='leftside']").InnerText;
                    
                }
            }
            catch
            {
                //silence is golden
            }

            System.Console.WriteLine($"SenderBase result: {result}");
            Console.ReadKey();
        }


    }
}</pre><p>First we need to add the cookie telling SenderBase that we accept the TOS (you know tha one a told you about in the beginning) then we use the HttpClient to connect and read the result as a string.  Last but not least we use HtmlAgilityPack to parse the document and find the reputation result we are looking for.</p>
<p>Build to see that everything works and then run it. The first argument is going to be the IP you wan&#8217;t to test.</p><pre class="crayon-plain-tag">dotnet build

dotnet run IPADDRESS</pre><p>That&#8217;s it, not as fast, easy and elegant as the DNS lookup but this will do for now. Will keep working on the dns lookup again soon.</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/">Public senderbase dns lookup is closed, here is how to look it up in c# using HttpClient and HtmlAgilityPack</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>c# Entity Framework 6 set transaction isolation level</title>
		<link>https://www.dattaproffs.se/2017/05/05/c-entity-framework-6-set-transaction-isolation-level/</link>
				<comments>https://www.dattaproffs.se/2017/05/05/c-entity-framework-6-set-transaction-isolation-level/#respond</comments>
				<pubDate>Fri, 05 May 2017 14:19:52 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=60</guid>
				<description><![CDATA[<p>I needed to set the transaction isolation level when using Entity Framework 6.x to use SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; Found this easy way to do it, not sure if it fits your need but it&#8217;s one way. [crayon-6a1ba95c39468942983365/] Just use Database.ExecuteSqlCommand in DataContext constructor. ktnxbye</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/05/05/c-entity-framework-6-set-transaction-isolation-level/">c# Entity Framework 6 set transaction isolation level</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>I needed to set the transaction isolation level when using Entity Framework 6.x to use SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;</p>
<p>Found this easy way to do it, not sure if it fits your need but it&#8217;s one way.</p><pre class="crayon-plain-tag">public partial class MyContext : DataContext
	{
		public MyContext() : base("Name=MyConnectionStringName")
		{
			Database.ExecuteSqlCommand("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;");
		}
         }</pre><p>Just use Database.ExecuteSqlCommand in DataContext constructor.</p>
<p>ktnxbye</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/05/05/c-entity-framework-6-set-transaction-isolation-level/">c# Entity Framework 6 set transaction isolation level</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2017/05/05/c-entity-framework-6-set-transaction-isolation-level/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Check if your forward and reverse dns match</title>
		<link>https://www.dattaproffs.se/2017/03/20/check-forward-reverse-dns-match/</link>
				<comments>https://www.dattaproffs.se/2017/03/20/check-forward-reverse-dns-match/#respond</comments>
				<pubDate>Mon, 20 Mar 2017 21:41:47 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[dns]]></category>
		<category><![CDATA[email]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=54</guid>
				<description><![CDATA[<p>When sending email it&#8217;s a best practice that your sending ips reverse and forward resolutions match. When looking up IPv4 addresses you use a special domain called in-addr.arpa so if you want to know the ptr of 8.8.4.4 just run this [crayon-6a1ba95c39883402833891/] See the name = in the answer, that&#8217;s the PTR not to see if <a class="read-more" href="https://www.dattaproffs.se/2017/03/20/check-forward-reverse-dns-match/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/03/20/check-forward-reverse-dns-match/">Check if your forward and reverse dns match</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>When sending email it&#8217;s a best practice that your sending ips reverse and forward resolutions match.</p>
<p>When looking up IPv4 addresses you use a special domain called in-addr.arpa so if you want to know the ptr of 8.8.4.4 just run this</p><pre class="crayon-plain-tag">nslookup -q=ptr 4.4.8.8.in-addr.arpa

//OR THIS SHORTHAND

nslookup -q=ptr 8.8.4.4

Non-authoritative answer:
4.4.8.8.in-addr.arpa    name = google-public-dns-b.google.com</pre><p>See the name = in the answer, that&#8217;s the PTR not to see if we have a confirmed forward and are good to go we need to see if the domains A-record match the IP we looked up. Run this</p><pre class="crayon-plain-tag">nslookup -q=a google-public-dns-b.google.com

Non-authoritative answer:
Name:    google-public-dns-b.google.com
Address:  8.8.4.4</pre><p>See the Address part in the answer it matches the ip we checked PTR on. That means that they are matching.</p>
<p>ktnxbye!</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/03/20/check-forward-reverse-dns-match/">Check if your forward and reverse dns match</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2017/03/20/check-forward-reverse-dns-match/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Getting started with cross platform ASP.NET Core, aspnet SpaServices, React and webpack</title>
		<link>https://www.dattaproffs.se/2017/03/15/getting-started-asp-net-core-aspnet-javascriptservices-react-webpack/</link>
				<comments>https://www.dattaproffs.se/2017/03/15/getting-started-asp-net-core-aspnet-javascriptservices-react-webpack/#respond</comments>
				<pubDate>Wed, 15 Mar 2017 22:40:22 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[asp.net core]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[react]]></category>
		<category><![CDATA[aspnet core]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=45</guid>
				<description><![CDATA[<p>So i&#8217;m using visual studio and doing .net mvc web development with angular. I wanted to try out react and there is a new version of aspnet core out there so i thought what the hell i will give it i try. I will assume some knowledge of asp.net mvc, javascript and this is just a <a class="read-more" href="https://www.dattaproffs.se/2017/03/15/getting-started-asp-net-core-aspnet-javascriptservices-react-webpack/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/03/15/getting-started-asp-net-core-aspnet-javascriptservices-react-webpack/">Getting started with cross platform ASP.NET Core, aspnet SpaServices, React and webpack</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>So i&#8217;m using visual studio and doing .net mvc web development with angular. I wanted to try out react and there is a new version of <a href="https://www.microsoft.com/net/core">aspnet core</a> out there so i thought what the hell i will give it i try. I will assume some knowledge of asp.net mvc, javascript and this is just a &#8220;how did i set it up&#8221; not a &#8220;i will learn you everything&#8221;.</p>
<p>One thing that i find confusing is the core versioning, <a href="https://www.hanselman.com/">Scott Hanselman</a> said in the <a href="https://live.asp.net/">lastest standup</a> that it isn&#8217;t really that hard if you tell it the right way. I think that MS haven&#8217;t done that really. There is Runtime, SDK and Tooling all of them in different versions. But i figured it out (just dowloaded the lastet ones and prayed) 🙂</p>
<p>Before i get started in how i did this you will need to know that all i wanted was to get something up and running ie bare minimum. I know there is templates in both dotnet cli and VS 2017 but i wanted to do it from scratch. The tools i will be using is Visual Studio code, dotnet cli and node with yarn as the package manager.</p>
<p>So let&#8217;s get started! Buckle up&#8230;</p>
<p>First download and install <a href="https://www.microsoft.com/net/core">ASP.NET Core SDK 1.1</a><br />
Install <a href="https://nodejs.org/en/">Node</a> and install <a href="https://yarnpkg.com/en/docs/install">Yarn</a> when you have these things installed you are ready to go.</p>
<p>For IDE i&#8217;m using <a href="https://code.visualstudio.com/download">Visual Studio Code</a> as mentioned above, you can install that if you wan&#8217;t a really smooth experience with intellisense and so on but any text editor will do.</p>
<p>The first thing we need to do is create a new dotnet application, i will go with the default mvc template.  Open up a command prompt and execute the following commands:</p><pre class="crayon-plain-tag">mkdir coremvcreact
cd coremvcreact
dotnet new mvc</pre><p>After that you will have a folder with these files and folders: <a href="http://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_4.png"><img class="alignnone size-full wp-image-46" src="http://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_4.png" alt="folder structure" width="250" height="250" srcset="https://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_4.png 250w, https://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_4-150x150.png 150w" sizes="(max-width: 250px) 100vw, 250px" /></a></p>
<p>Then in the same command prompt we can execute these commands to see if it runs:</p><pre class="crayon-plain-tag">dotnet restore
dotnet run</pre><p>If everything goes well we should be able to open http://localhost:5000 in your browser and see the default mvc biolerplate page.</p>
<p>Let&#8217;s go on and install some clientside packages via yarn (uses npm repository) first of init a package.json by running</p><pre class="crayon-plain-tag">yarn init</pre><p>We will be prompted with some questions i will for now just  press enter until the file package.json is generated. This is what we will end up with:</p><pre class="crayon-plain-tag">{
  "name": "foldername",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT"
}</pre><p>Now we are going to add the dependencies and devDependencies we require to create a super basic react application, a super neat feature of Visual Studio Code is that you will get intellisense and autocomplete! in package.json sweetness. This is what the finished package.json will look like.</p><pre class="crayon-plain-tag">{
  "name": "ReactTest",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "react": "^15.4.2",
    "react-dom": "^15.4.2"
  },"devDependencies": {
    "aspnet-webpack": "^1.0.28",
    "aspnet-webpack-react": "^1.0.5",
    "babel": "^6.23.0",
    "babel-core": "^6.24.0",
    "babel-loader": "^6.4.0",
    "babel-preset-es2015": "^6.24.0",
    "babel-preset-react": "^6.23.0",
    "babel-preset-stage-0": "^6.22.0",
    "webpack": "^2.2.1",
    "webpack-hot-middleware": "^2.17.1"
  }
}</pre><p>The dependencies is just react and react-dom these are needed for react to even think about running 😉</p>
<p>The babel packages is for transpiling &#8220;newer&#8221; javascript to javascript that current browsers understand. webpack is for utilizing and doing the packaging of the javascript. We will later go into how that&#8217;s done with webpack.config.js</p>
<p>The aspnet-* packages is for running the SpaServices in development mode.</p>
<p>Save the file and go to the command prompt and execute</p><pre class="crayon-plain-tag">yarn</pre><p>to install all the packages. we could have just run</p><pre class="crayon-plain-tag">yarn add packagename packagename &lt;-- for dependencies

yarn add --dev packagename packagename &lt;-- for devDependencies</pre><p>but i prefer VS Code with autocomplete.</p>
<p>With ASP.NET Core back to csproj files again we are going to add the SpaServices package to the csproj file.</p><pre class="crayon-plain-tag">&lt;ItemGroup&gt;
    &lt;PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" /&gt;
    &lt;PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" /&gt;
    &lt;PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.0" /&gt;
    &lt;!-- Add the following package --&gt;
    &lt;PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.0" /&gt;
&lt;/ItemGroup&gt;</pre><p>The run</p><pre class="crayon-plain-tag">dotnet restore</pre><p>Now we are ready to clean up in the folders and start writing some code.  Delete the following folders and files in wwwroot also remove the bower files in root.<a href="http://www.dattaproffs.se/wp-content/uploads/2017/03/delete.gif"><img class="alignnone size-full wp-image-49" src="http://www.dattaproffs.se/wp-content/uploads/2017/03/delete.gif" alt="delete files and folders" width="586" height="141" /></a></p>
<p>Now we need to create these folders and files</p><pre class="crayon-plain-tag">webpack.config.js
App\index.js 
App\Components\Main.js</pre><p>Open the webpack.config.js and paste the following code:</p><pre class="crayon-plain-tag">const path = require('path');
const webpack = require('webpack');
const outputDir = './wwwroot/js'

module.exports = (env) =&gt; {
    const isDevBuild = !(env &amp;&amp; env.prod);
    return[{
    entry:{app: './App/index.js'},
    output: {
        path: path.resolve(__dirname, outputDir),
        filename: '[name].bundle.js',
        publicPath: '/js/'
    },
    module: {
        rules: [
            {
                test: /\.js/,
                exclude: /node_modules/,
                use: [{
                    loader: 'babel-loader',
                    options: { presets: [['es2015', { "modules": false }], 'react', 'stage-0'] }
                }]
            }
        ]
    },
    plugins: [
        
        new webpack.optimize.CommonsChunkPlugin({
            name: 'commons',
            filename: 'commons.js',
            minChunks: 2
        })

    ].concat(isDevBuild ? [
        // Plugins that apply in development builds only
            new webpack.SourceMapDevToolPlugin({
                filename: '[file].map', // Remove this line if you prefer inline source maps
                moduleFilenameTemplate: path.relative(outputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk
            })
    ] : [
        // Plugins that apply in production builds only
            new webpack.optimize.UglifyJsPlugin()
    ]),
}]

}</pre><p>Most of this is just copied from the <a href="https://github.com/aspnet/JavaScriptServices/blob/dev/templates/ReactSpa/webpack.config.js">JavaScriptServices templates</a> and it&#8217;s pretty straight forward. What&#8217;s the entry of our app ./App/index.js where should webpack output the result ./wwwroot/js and the name will be app.bundle.js</p>
<p>The module part is where babel comes in, we tell webpack to look for *.js files but not in the node_modules folder. Use the babel-loader and the presets defined in options.</p>
<p>The plugins is not bare minimum but handy the first  one CommonChunksPlugin will look for parts that are included in more then 2 places and separate them to their own .js file.  And if there is a dev build we also generate Source maps for the js files generated.</p>
<p>Because we used the mvc template when running dotnet new we get some boilerplate code we don&#8217;t need. So change these files Views\Shared\_Layout.cshtml and Views\Home\Index.cshtml to this:</p><pre class="crayon-plain-tag">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;
    &lt;title&gt;@ViewData["Title"] - ReactTest&lt;/title&gt;

&lt;/head&gt;
&lt;body&gt;
        @RenderBody()

    @RenderSection("Scripts", required: false)
&lt;/body&gt;
&lt;/html&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;div id="react-app"&gt;

&lt;/div&gt;

@section scripts{
    &lt;script src="~/js/commons.js"&gt;&lt;/script&gt;
    &lt;script src="~/js/app.bundle.js"&gt;&lt;/script&gt;
}</pre><p>Lets add code to the react js files we created earlier</p><pre class="crayon-plain-tag">App\index.js 
App\Components\Main.js</pre><p></p><pre class="crayon-plain-tag">import React, { Component } from 'react';
import {render} from 'react-dom'

import Main from './Components/Main'

render((
    &lt;Main /&gt;
), document.getElementById('react-app'));</pre><p></p><pre class="crayon-plain-tag">import React, { Component } from 'react';

class Main extends Component {

    render() {
        return (
            &lt;div&gt;
                This is the Main Component
            &lt;/div&gt;
        );
    }
}

export default Main;</pre><p>Now if we try to run</p><pre class="crayon-plain-tag">dotnet run</pre><p>we will see this error in the console <a href="http://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_5.png"><img class="alignnone size-full wp-image-50" src="http://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_5.png" alt="404 bundle" width="690" height="42" srcset="https://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_5.png 690w, https://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_5-300x18.png 300w" sizes="(max-width: 690px) 100vw, 690px" /></a></p>
<p>this is because we have not packed the javascript files with webpack yet, run this (if we have wepack installed globally, if not read below)</p><pre class="crayon-plain-tag">webpack</pre><p>For this to work we need to install webpack globally, i could not get this to work with yarn if you do it&#8217;s good to go but i needed to run</p><pre class="crayon-plain-tag">npm install -g webpack</pre><p>Then we can run dotnet run again. Tadaaaa it works we should now have this amazing react component showing in the browser<a href="http://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_7.png"><img class="alignnone size-full wp-image-51" src="http://www.dattaproffs.se/wp-content/uploads/2017/03/Screenshot_7.png" alt="react running" width="220" height="77" /></a></p>
<p>Now for the hot module reloading we need to add a few lines of code in Startup.cs</p><pre class="crayon-plain-tag">public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                //**THIS IS WHAT WE NEED TO ADD
                app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions(){
                    HotModuleReplacement = true,
                    ReactHotModuleReplacement = true
                });
                // **
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();

            app.UseMvc(routes =&gt;
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }</pre><p>Remember to add a using at the top</p><pre class="crayon-plain-tag">using Microsoft.AspNetCore.SpaServices.Webpack;</pre><p>Now delete the files in wwwroot\js and run the project again. Remeber these js-files is only there because we build them with the webpack command and we do not wan&#8217;t that. We wan&#8217;t everything to run with the following command so let&#8217;s try</p><pre class="crayon-plain-tag">dotnet run</pre><p>Gah! Darn why doesn&#8217;t it work? Remember the code we put in Startup.cs for WebpackDevMiddleware it&#8217;s in a if statement to only run if the Hosting environment is in development mode and what do we see when running dotnet run?</p><pre class="crayon-plain-tag">Hosting environment: Production
Content root path: D:\folder\Reacttest
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.</pre><p>That&#8217;s right t&#8217;s running in production by default. It&#8217;s an easy fix we just need to set the env to development and this is how we do it in different command promps / terminals</p><pre class="crayon-plain-tag">// PowerShell
$env:ASPNETCORE_ENVIRONMENT="Development"
// Windows cmd
set ASPNETCORE_ENVIRONMENT=Development
// *Nix
export ASPNETCORE_ENVIRONMENT="Development"</pre><p>Run the correct one for your environment and then run again</p><pre class="crayon-plain-tag">dotnet run</pre><p>If we try to change the text in Main.js and save we will see in the browser that it tries to HOT Reload but it won&#8217;t work because of</p><pre class="crayon-plain-tag">The following modules couldn't be hot updated: (Full reload needed)</pre><p>We need to accept hot reloading by changing the index.js to this</p><pre class="crayon-plain-tag">import React, { Component } from 'react';
import {render} from 'react-dom'

import Main from './Components/Main'

render((
    &lt;Main /&gt;
), document.getElementById('react-app'));

// ADD THIS
if(module.hot){
    module.hot.accept()
}</pre><p>Now save and do a full refresh of the browser then try to change the text in Main.js again</p>
<p>YIIIIHAAAA! We are live. Let&#8217;s just end here and i will get back to other stuff in a later post on how to expand on this.</p>
<p>Please let me know in the comments if there is better ways of doing these stuff i would appreciate it.</p>
<p>Code is up on <a href="https://github.com/dattaproffs/aspnetcorereactminimum">github</a></p>
<p>Thanks for now</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/03/15/getting-started-asp-net-core-aspnet-javascriptservices-react-webpack/">Getting started with cross platform ASP.NET Core, aspnet SpaServices, React and webpack</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2017/03/15/getting-started-asp-net-core-aspnet-javascriptservices-react-webpack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>How to check Cisco Senderbase reputation from commandline</title>
		<link>https://www.dattaproffs.se/2017/02/23/check-cisco-senderbase-reputation-commandline/</link>
				<comments>https://www.dattaproffs.se/2017/02/23/check-cisco-senderbase-reputation-commandline/#comments</comments>
				<pubDate>Thu, 23 Feb 2017 21:02:42 +0000</pubDate>
		<dc:creator><![CDATA[Fredrik Berggren]]></dc:creator>
				<category><![CDATA[dns]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[reputation]]></category>
		<category><![CDATA[Senderbase]]></category>

		<guid isPermaLink="false">http://www.dattaproffs.se/?p=36</guid>
				<description><![CDATA[<p>*UPDATE 2* I have created an API for all sorts of email and ip related info, read more here Api for talos reputation (previous senderbase.org), senderscore, reputation authority and blacklists. *UPDATE* Since this no longer work i have created a solution in c# for now, not as &#8220;fancy&#8221; but it does the job.  Go here <a class="read-more" href="https://www.dattaproffs.se/2017/02/23/check-cisco-senderbase-reputation-commandline/">&#8230;&#160;<span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/02/23/check-cisco-senderbase-reputation-commandline/">How to check Cisco Senderbase reputation from commandline</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>*UPDATE 2*<br />
I have created an API for all sorts of email and ip related info, read more here <a href="http://www.dattaproffs.se/2017/10/29/api-talos-reputation-previous-senderbase-senderscore-reputation-authority-blacklists/">Api for talos reputation (previous senderbase.org), senderscore, reputation authority and blacklists.</a></p>
<p>*UPDATE*<br />
Since this no longer work i have created a solution in c# for now, not as &#8220;fancy&#8221; but it does the job.  Go here to read the post <a href="http://www.dattaproffs.se/2017/05/07/public-senderbase-dns-lookup-closed-look-c-using-httpclient-htmlagilitypack/">Public senderbase dns lookup is closed, here is how to look it up in c# using HttpClient and HtmlAgilityPack </a></p>
<p>Senderbase is similar to <a href="http://www.dattaproffs.se/2017/02/22/check-your-ips-senderscore-from-the-commandline/">Senderscore</a> it is a reputation score for you IP address and/or domain you can use the website <a href="http://www.senderbase.org/">http://www.senderbase.org/</a> to lookup your IP. But if you just wan&#8217;t to check it from the command line this is how you do it.</p>
<p>First little about how the reputation is calculated.</p>
<blockquote><p>Reputation scores in SenderBase may range from -10 to +10, reflecting the likelihood that a sending IP address is trying to send spam. Highly negative scores indicate senders who are very likely to be sending spam; highly positive scores indicate senders who are unlikely to be sending spam.</p>
<p>SenderBase combines multiple sources of information to determine a &#8220;reputation score&#8221; for any IP address. This information includes:</p>
<ul>
<li>Email volume information provided by tens of thousands of organizations that regularly receive Internet email</li>
<li>Spam complaints received by the <a href="http://www.spamcop.net/" target="_blank" rel="nofollow noopener">SpamCop</a> service</li>
<li>Information on other DNS-based blacklists</li>
</ul>
</blockquote>
<p>This is the command to get the score if your IP is 1.2.3.4</p><pre class="crayon-plain-tag">nslookup -type=txt 4.3.2.1.rf.senderbase.org

Non-authoritative answer:
4.3.2.1.rf.senderbase.org        text = "5.5"</pre><p>Here is the tricky part, if you do a lookup on the website you will get a grouped reputation Poor, Neutral and Good. So how do you know where the score you get in the dns lookup fits?</p>
<p>This is my findings:</p>
<blockquote><p>Poor is between -10 and -1</p>
<p>Neutral is between -1 and 2</p>
<p>Good is between 2 and 10</p></blockquote>
<p>If you have any other knowledge about the classification from the scoring please let me know in the comments.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.dattaproffs.se/2017/02/23/check-cisco-senderbase-reputation-commandline/">How to check Cisco Senderbase reputation from commandline</a> appeared first on <a rel="nofollow" href="https://www.dattaproffs.se">dattaproffs</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.dattaproffs.se/2017/02/23/check-cisco-senderbase-reputation-commandline/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
							</item>
	</channel>
</rss>
