When adding the user type in the whole name
IIS AppPool\DefaultAppPool
Monday, March 2, 2015
Thursday, March 27, 2014
Fiddler and Asp.Net
Ran across this today, just a handy item to know. I use Fiddler a lot of debugging web programming. Today I needed to use to to debug some Web.Request conversation. For the most part I write everything out to log files and it contains what I need. But, I was dealing with a tech support organization who really wanted Fiddler output.
http://weblog.west-wind.com/posts/2009/Jan/14/Monitoring-HTTP-Output-with-Fiddler-in-NET-HTTP-Clients-and-WCF-Proxies
So, even though I have libraries to man-handle the Web.Requests the following entry in the web.config file allowed Fiddler to see the conversation. No code change!
http://weblog.west-wind.com/posts/2009/Jan/14/Monitoring-HTTP-Output-with-Fiddler-in-NET-HTTP-Clients-and-WCF-Proxies
So, even though I have libraries to man-handle the Web.Requests the following entry in the web.config file allowed Fiddler to see the conversation. No code change!
<system.net> <defaultProxy> <proxy usesystemdefault="False" bypassonlocal="True" proxyaddress="http://127.0.0.1:8888" /> </defaultProxy> </system.net>
If you forget and don't have Fiddler running, you can get the following error
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
Thursday, March 13, 2014
Handy App Pool info - 32bit vs 64 bit
We process a lot of huge document so to be able to run in 64 bit mode and use more than 4GB of memory is kind of important.
Trying to figure out which app pools are actually running in 32-bit mode
appcmd list wp
Then go into Task Manager, show processes for all users. If the PID doesn't show up then View | Select Columns | check PID
The processes that have a *32 next to the name are the ones running in 32 bit mode.
So, w3wp.exe *32 is running in 32 bit mode
How to solve that...
Go into the IIS Manager, find the Application Pools, right click | advanced settings | Enable 32-bit application = False.
You must compile your application in 64 bit mode or AnyCPU. Here is a really good explanation for
moving-asp-net-web-application-from-32-bit-to-64-bit
Trying to figure out which app pools are actually running in 32-bit mode
appcmd list wp
Then go into Task Manager, show processes for all users. If the PID doesn't show up then View | Select Columns | check PID
The processes that have a *32 next to the name are the ones running in 32 bit mode.
So, w3wp.exe *32 is running in 32 bit mode
How to solve that...
Go into the IIS Manager, find the Application Pools, right click | advanced settings | Enable 32-bit application = False.
You must compile your application in 64 bit mode or AnyCPU. Here is a really good explanation for
moving-asp-net-web-application-from-32-bit-to-64-bit
Wednesday, February 26, 2014
MSChart cheat sheet
Microsoft bought Dundas charts. Sometimes it helps to google that tool as well. Better documented.
Dundas Documentation
Line graphs are not fond of nulls, seems to mess up results
Formatting
chart.Series[name].Label = "#VALY{C0}"; //will give you the value of Y formatting with currency
chart.ChartAreas[0].AxisY.LabelStyle.Format = "{C0}"; //format the labels of the Y axis with currency
Dundas Documentation
Line graphs are not fond of nulls, seems to mess up results
Formatting
chart.Series[name].Label = "#VALY{C0}"; //will give you the value of Y formatting with currency
chart.ChartAreas[0].AxisY.LabelStyle.Format = "{C0}"; //format the labels of the Y axis with currency
Tuesday, February 11, 2014
abcPDF
Here is an interesting problem when using abcPDF Gecko engine.
Error creating initial PDF: WebSupergoo.ABCpdf9.Internal.PDFException: Failed to add HTML: Page load timed out.; Gecko engine hit an error it was unable to recover from. Possible causes: XULRunner folder is corrupt or is from another version of ABCpdf. ---> WebSupergoo.ABCpdf9.Internal.PDFException: Gecko engine hit an error it was unable to recover from. Possible causes: XULRunner folder is corrupt or is from another version of ABCpdf. at WebSupergoo.ABCpdf9.Internal.Gecko.GeckoWorker.AddImageUrl(String url, Double pageWidthMm, Double pageHeightMm, AddImageUrlOptions options, UInt32& numCommands, Byte[]& data) --- End of inner exception stack trace ---
This took a while to track down. It is a combo of two things. One, if the page that you are rendering has something like this one it:
$(document).ready(function () { window.print(); });
And, your abcPDF Gecko MediaType is Screen. Regardless of your UseScript setting.
Now the document also refer to an error in another condition as well. Wouldn't it be awesome if they would give you the exception that will be thrown?
"For the Gecko engine, the Screen media must be used with UseScript true. An invalid combination (i.e. Screen with UseScript false) yields an exception when you call AddImageUrl or AddImageHtml."
I must also say, I have been a huge fan of WebSupergoo for a long time. I have programmed a lot of heavy duty PDF magic with their product. Also, I have been a fan of their support. But, I have to say their support is getting slow to respond and unhelpful.
Error creating initial PDF: WebSupergoo.ABCpdf9.Internal.PDFException: Failed to add HTML: Page load timed out.; Gecko engine hit an error it was unable to recover from. Possible causes: XULRunner folder is corrupt or is from another version of ABCpdf. ---> WebSupergoo.ABCpdf9.Internal.PDFException: Gecko engine hit an error it was unable to recover from. Possible causes: XULRunner folder is corrupt or is from another version of ABCpdf. at WebSupergoo.ABCpdf9.Internal.Gecko.GeckoWorker.AddImageUrl(String url, Double pageWidthMm, Double pageHeightMm, AddImageUrlOptions options, UInt32& numCommands, Byte[]& data) --- End of inner exception stack trace ---
This took a while to track down. It is a combo of two things. One, if the page that you are rendering has something like this one it:
$(document).ready(function () { window.print(); });
And, your abcPDF Gecko MediaType is Screen. Regardless of your UseScript setting.
Now the document also refer to an error in another condition as well. Wouldn't it be awesome if they would give you the exception that will be thrown?
"For the Gecko engine, the Screen media must be used with UseScript true. An invalid combination (i.e. Screen with UseScript false) yields an exception when you call AddImageUrl or AddImageHtml."
I must also say, I have been a huge fan of WebSupergoo for a long time. I have programmed a lot of heavy duty PDF magic with their product. Also, I have been a fan of their support. But, I have to say their support is getting slow to respond and unhelpful.
Thursday, January 23, 2014
Digesting Sql Server View Definitions
I needed to parse a view definition and figure out the field mappings and underlying tables. Just some tricks along the way. I was using Sql Server 2008.
This will give you the entire view definition divided out into rows. Each row constitutes 255 chars
EXEC sp_helptext 'myViewName'
or
EXEC sp_help 'myViewName'
This gives you the entire view definition
select definition, *
from sys.objects o
join sys.sql_modules m on m.object_id = o.object_id
where o.object_id = object_id( 'myViewName')
and o.type = 'V'
Getting all the tables and fields that a view is dependant upon
sp_depends @objname = N'dbo.myViewName'
Getting the columns in the view in an easier consumable format
SELECT
*
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME like ('%myViewName%')
ORDER BY
ORDINAL_POSITION ASC;
This will give you the entire view definition divided out into rows. Each row constitutes 255 chars
EXEC sp_helptext 'myViewName'
or
EXEC sp_help 'myViewName'
This gives you the entire view definition
select definition, *
from sys.objects o
join sys.sql_modules m on m.object_id = o.object_id
where o.object_id = object_id( 'myViewName')
and o.type = 'V'
Getting all the tables and fields that a view is dependant upon
sp_depends @objname = N'dbo.myViewName'
Getting the columns in the view in an easier consumable format
SELECT
*
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME like ('%myViewName%')
ORDER BY
ORDINAL_POSITION ASC;
Subscribe to:
Posts (Atom)